[Scummvm-cvs-logs] SF.net SVN: scummvm:[50716] tools/branches/gsoc2010-decompiler/decompiler/ test/cfg_test.h

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Tue Jul 6 01:07:24 CEST 2010


Revision: 50716
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50716&view=rev
Author:   pidgeot
Date:     2010-07-05 23:07:24 +0000 (Mon, 05 Jul 2010)

Log Message:
-----------
Prevent possible segfault if test fails

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h	2010-07-05 23:05:12 UTC (rev 50715)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h	2010-07-05 23:07:24 UTC (rev 50716)
@@ -502,7 +502,7 @@
 			case 0x8B:
 				TS_ASSERT(gr->_type == kNormal);
 				TS_ASSERT(gr->_startElse);
-				TS_ASSERT(gr->_endElse->_start->_address == 0x8B);
+				TS_ASSERT(gr->_endElse && gr->_endElse->_start->_address == 0x8B);
 				break;
 			case 0x91:
 				TS_ASSERT(gr->_type == kNormal);
@@ -512,7 +512,7 @@
 			case 0xA6:
 				TS_ASSERT(gr->_type == kNormal);
 				TS_ASSERT(!gr->_startElse);
-				TS_ASSERT(gr->_endElse->_start->_address == 0x91);
+				TS_ASSERT(gr->_endElse && gr->_endElse->_start->_address == 0x91);
 				break;
 			default:
 				TS_ASSERT(gr->_type == kNormal);


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