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. // Subrecords.
if (recordId == 0xF1FA) { if (recordId == 0xF1FA) {
if (subrecords == 0) { 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 { } else {
for (int i = 0; i < subrecords; ++i) { for (int i = 0; i < subrecords; ++i) {
int32 filePos = file.pos(); int32 filePos = file.pos();