|
From: <sag...@us...> - 2010-03-24 19:25:39
|
Revision: 549
http://modplug.svn.sourceforge.net/modplug/?rev=549&view=rev
Author: saga-games
Date: 2010-03-24 19:25:32 +0000 (Wed, 24 Mar 2010)
Log Message:
-----------
[Fix] MPTM Saving: A missing null pointer check crashed OpenMPT when trying to access a deleted instrument slot.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-03-24 14:27:14 UTC (rev 548)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-03-24 19:25:32 UTC (rev 549)
@@ -35,7 +35,7 @@
const INSTRUMENTINDEX iCount = sf.GetNumInstruments();
for(INSTRUMENTINDEX i = 1; i <= iCount; i++)
{
- if(sf.Instruments[i]->pTuning != 0)
+ if(sf.Instruments[i] != nullptr && sf.Instruments[i]->pTuning != 0)
return true;
}
return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|