# HG changeset patch # User Matti Hamalainen # Date 1425553816 -7200 # Node ID 51eb5788c1fc3d4bcc6f341a912ab7ec802c1045 # Parent bd2615822bbf247266b5893b441010249ebc1559 Add a NULL pointer check here. diff -r bd2615822bbf -r 51eb5788c1fc minijss/jloadxm.c --- a/minijss/jloadxm.c Thu Mar 05 13:06:40 2015 +0200 +++ b/minijss/jloadxm.c Thu Mar 05 13:10:16 2015 +0200 @@ -972,7 +972,7 @@ for (index = 0; index < module->nextInstruments; index++) { JSSExtInstrument *einst = module->extInstruments[index]; - if ((ret = jssXMLoadInstrumentSamples(inFile, module, einst, index)) != DMERR_OK) + if (einst != NULL && (ret = jssXMLoadInstrumentSamples(inFile, module, einst, index)) != DMERR_OK) goto out; } break;