[Scummvm-cvs-logs] SF.net SVN: scummvm:[52035] tools/branches/gsoc2010-decompiler/decompiler/ control_flow.cpp

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Thu Aug 12 14:35:46 CEST 2010


Revision: 52035
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52035&view=rev
Author:   pidgeot
Date:     2010-08-12 12:35:46 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
DECOMPILER: Prevent segfault if no functions
defined when calling createGroups

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp

Modified: tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp	2010-08-12 11:42:32 UTC (rev 52034)
+++ tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp	2010-08-12 12:35:46 UTC (rev 52035)
@@ -258,7 +258,7 @@
 }
 
 void ControlFlow::createGroups() {
-	if (GET(_engine->_functions.begin()->second._v)->_stackLevel != -1)
+	if (!_engine->_functions.empty() && GET(_engine->_functions.begin()->second._v)->_stackLevel != -1)
 		return;
 
 	// Detect more functions


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