[Scummvm-cvs-logs] CVS: scummvm/sound mididrv.cpp,1.27,1.28

James Brown ender at users.sourceforge.net
Sun May 12 03:19:02 CEST 2002


Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv29358

Modified Files:
	mididrv.cpp 
Log Message:
Fix crash if envvar not set.


Index: mididrv.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- mididrv.cpp	12 May 2002 09:21:27 -0000	1.27
+++ mididrv.cpp	12 May 2002 10:18:40 -0000	1.28
@@ -386,7 +386,8 @@
 			error("Cannot open /dev/null to dump midi output");
 	}
 
-	_device_num = atoi(getenv("SCUMMVM_MIDIPORT"));
+	if (getenv("SCUMMVM_MIDIPORT"))
+		_device_num = atoi(getenv("SCUMMVM_MIDIPORT"));
 	return 0;
 }
 





More information about the Scummvm-git-logs mailing list