[Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.14,1.15

Eugene Sandulenko sev at users.sourceforge.net
Sun Aug 1 00:51:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6544

Modified Files:
	actionmap.cpp 
Log Message:
More tweaks


Index: actionmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- actionmap.cpp	1 Aug 2004 07:41:15 -0000	1.14
+++ actionmap.cpp	1 Aug 2004 07:50:28 -0000	1.15
@@ -42,6 +42,11 @@
 
 ActionMap::ActionMap(void) {
 	debug(0, "ACTIONMAP Module: Initializing...");
+
+	_exits_loaded = 0;
+	_exits_tbl = NULL;
+	_n_exits = 0;
+
 	_initialized = true;
 }
 
@@ -120,16 +125,17 @@
 		return R_SUCCESS;
 	}
 
-	for (i = 0; i < _n_exits; i++) {
-		exmap_entry = &_exits_tbl[i];
+	if (_exits_tbl) {
+		for (i = 0; i < _n_exits; i++) {
+			exmap_entry = &_exits_tbl[i];
 
-		if (_exits_tbl[i])
-			if (exmap_entry->pt_tbl)
-				free(exmap_entry->pt_tbl);
-	}
+			if (exmap_entry != NULL)
+				if (exmap_entry->pt_tbl)
+					free(exmap_entry->pt_tbl);
+		}
 
-	if (_exits_tbl)
 		free(_exits_tbl);
+	}
 
 	_exits_loaded = 0;
 	_exits_tbl = NULL;





More information about the Scummvm-git-logs mailing list