From: <ave...@us...> - 2009-08-17 16:58:01
|
Revision: 6904 http://gemrb.svn.sourceforge.net/gemrb/?rev=6904&view=rev Author: avenger_teambg Date: 2009-08-17 16:57:54 +0000 (Mon, 17 Aug 2009) Log Message: ----------- fix a possible crasher (original engine died here) Modified Paths: -------------- gemrb/trunk/gemrb/plugins/Core/GSUtils.cpp Modified: gemrb/trunk/gemrb/plugins/Core/GSUtils.cpp =================================================================== --- gemrb/trunk/gemrb/plugins/Core/GSUtils.cpp 2009-08-17 16:55:17 UTC (rev 6903) +++ gemrb/trunk/gemrb/plugins/Core/GSUtils.cpp 2009-08-17 16:57:54 UTC (rev 6904) @@ -230,6 +230,11 @@ strnuprcpy(owner, store->GetOwner(), 32); } } + if (!store) { + printMessage("GameScript","Store cannot be opened!\n", LIGHT_RED); + return false; + } + bool ret = false; //don't use triggers (pst style), it would be possible to create infinite loops if (store->FindItem(itemname, false) != (unsigned int)-1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |