From: <ac...@us...> - 2007-10-28 03:07:32
|
Revision: 137 http://planeshift.svn.sourceforge.net/planeshift/?rev=137&view=rev Author: acraig Date: 2007-10-27 20:07:36 -0700 (Sat, 27 Oct 2007) Log Message: ----------- CacheManager::GetBasicItemStatsByID checks to make sure ID is not 0 and bails out if it is. Modified Paths: -------------- trunk/docs/history.txt trunk/src/server/cachemanager.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2007-10-28 02:17:33 UTC (rev 136) +++ trunk/docs/history.txt 2007-10-28 03:07:36 UTC (rev 137) @@ -3,7 +3,9 @@ created. Before was hitting the database everytime a guild window was opened. - Saving of character skills now doesn't clear them all and rewrite them - anymore. Now it does and update and if that fails will do an insert. + anymore. Now it does and update and if that fails will do an insert. +- Added check to CacheManager::GetBasicItemStatsByID() to bail out if + the ID was 0. *** 2007-10-26 by Sasha Levin - Added support for custom item names. Modified: trunk/src/server/cachemanager.cpp =================================================================== --- trunk/src/server/cachemanager.cpp 2007-10-28 02:17:33 UTC (rev 136) +++ trunk/src/server/cachemanager.cpp 2007-10-28 03:07:36 UTC (rev 137) @@ -1779,6 +1779,9 @@ // Get item basic stats by hashed table psItemStats *CacheManager::GetBasicItemStatsByID(uint32 id) { + if ( id == 0 ) + return NULL; + psItemStats *itemstats = itemStats_IDHash.Get(id,NULL); if(itemstats) return itemstats; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |