[Scummvm-cvs-logs] SF.net SVN: scummvm: [27126] scummvm/branches/branch-0-10-0/engines/scumm/ he/script_v60he.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Wed Jun 6 05:38:58 CEST 2007


Revision: 27126
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27126&view=rev
Author:   Kirben
Date:     2007-06-05 20:38:57 -0700 (Tue, 05 Jun 2007)

Log Message:
-----------
Fix possible crash issue, if music volume was set by 3DO versions of HE games.

Modified Paths:
--------------
    scummvm/branches/branch-0-10-0/engines/scumm/he/script_v60he.cpp

Modified: scummvm/branches/branch-0-10-0/engines/scumm/he/script_v60he.cpp
===================================================================
--- scummvm/branches/branch-0-10-0/engines/scumm/he/script_v60he.cpp	2007-06-06 03:38:45 UTC (rev 27125)
+++ scummvm/branches/branch-0-10-0/engines/scumm/he/script_v60he.cpp	2007-06-06 03:38:57 UTC (rev 27126)
@@ -1090,7 +1090,7 @@
 	int val;
 
 	// Fatty Bear uses positive values
-	if ((_game.platform == Common::kPlatformPC) && (_game.id == GID_FBEAR))
+	if (_game.platform == Common::kPlatformPC && _game.id == GID_FBEAR)
 		size = -size;
 
 	assert(_hInFileTable[slot]);
@@ -1120,7 +1120,7 @@
 	int slot = pop();
 
 	// Fatty Bear uses positive values
-	if ((_game.platform == Common::kPlatformPC) && (_game.id == GID_FBEAR))
+	if (_game.platform == Common::kPlatformPC && _game.id == GID_FBEAR)
 		size = -size;
 
 	assert(_hOutFileTable[slot]);
@@ -1139,7 +1139,9 @@
 
 	switch (subOp) {
 	case 222:
-		_imuse->setMusicVolume(arg);
+		if (_imuse) {
+			_imuse->setMusicVolume(arg);
+		}
 		break;
 	case 223:
 		// WORKAROUND: For error in room script 228 (room 2) of fbear.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list