MUTATIONOFJB: Add null check.

This commit is contained in:
Ľubomír Remák 2018-07-15 18:23:19 +02:00 committed by Eugene Sandulenko
parent 74ef0d9cfe
commit f70eb01061

View File

@ -62,7 +62,9 @@ bool AnimationDecoder::decode(AnimationDecoderCallback *callback) {
// Subrecords.
if (recordId == 0xF1FA) {
if (subrecords == 0) {
callback->onFrame(frameNo, _surface); // Empty record, frame identical to the previous one.
if (callback) {
callback->onFrame(frameNo, _surface); // Empty record, frame identical to the previous one.
}
} else {
for (int i = 0; i < subrecords; ++i) {
int32 filePos = file.pos();