From: <sag...@us...> - 2012-02-19 21:21:53
|
Revision: 1188 http://modplug.svn.sourceforge.net/modplug/?rev=1188&view=rev Author: saga-games Date: 2012-02-19 21:21:46 +0000 (Sun, 19 Feb 2012) Log Message: ----------- [Fix] Previewing instruments with a valid MIDI channel but no plugin assigned crashed the tracker (probably since rev 1156). [Mod] OpenMPT: Version is now 1.20.00.70 Revision Links: -------------- http://modplug.svn.sourceforge.net/modplug/?rev=1156&view=rev Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/version.h Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2012-02-19 18:09:15 UTC (rev 1187) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2012-02-19 21:21:46 UTC (rev 1188) @@ -893,9 +893,9 @@ CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); CHANNELINDEX nChn = GetNumChannels(); - if ((!pMainFrm) || (!note)) return FALSE; + if (pMainFrm == nullptr || note == NOTE_NONE) return FALSE; if (nVol > 256) nVol = 256; - if (MODCOMMAND::IsNoteOrEmpty(note)) + if (MODCOMMAND::IsNote(MODCOMMAND::NOTE(note))) { //kill notes if required. @@ -1018,8 +1018,8 @@ UINT nPlugin = 0; if (pChn->pModInstrument) nPlugin = pChn->pModInstrument->nMixPlug; // first try instrument VST - if ((!nPlugin) || (nPlugin > MAX_MIXPLUGINS) && (nCurrentChn != CHANNELINDEX_INVALID)) - nPlugin = m_SndFile.ChnSettings[nCurrentChn].nMixPlugin; // Then try Channel VST + if ((!nPlugin || nPlugin > MAX_MIXPLUGINS) && nCurrentChn != CHANNELINDEX_INVALID) + nPlugin = m_SndFile.ChnSettings[nCurrentChn].nMixPlugin; // Then try Channel VST if ((nPlugin) && (nPlugin <= MAX_MIXPLUGINS)) { Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-02-19 18:09:15 UTC (rev 1187) +++ trunk/OpenMPT/mptrack/version.h 2012-02-19 21:21:46 UTC (rev 1188) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 00 -#define VER_MINORMINOR 69 +#define VER_MINORMINOR 70 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |