Prevent unnecessary 'Trying to get null resource' console warnings while loading ship data; bug #1123

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3595 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2011-04-27 08:44:39 +00:00
parent de631ed548
commit ede7d2a545
+22 -13
View File
@@ -71,25 +71,34 @@ load_ship (SPECIES_ID SpeciesID, BOOLEAN LoadBattleData)
goto BadLoad; goto BadLoad;
RDPtr->CodeRef = CodeRef; RDPtr->CodeRef = CodeRef;
RDPtr->ship_info.icons = CaptureDrawable (LoadGraphic ( if (RDPtr->ship_info.icons_rsc != NULL_RESOURCE)
RDPtr->ship_info.icons_rsc));
if (!RDPtr->ship_info.icons)
{ {
/* goto BadLoad */ RDPtr->ship_info.icons = CaptureDrawable (LoadGraphic (
RDPtr->ship_info.icons_rsc));
if (!RDPtr->ship_info.icons)
{
/* goto BadLoad */
}
} }
RDPtr->ship_info.melee_icon = CaptureDrawable (LoadGraphic ( if (RDPtr->ship_info.melee_icon_rsc != NULL_RESOURCE)
RDPtr->ship_info.melee_icon_rsc));
if (!RDPtr->ship_info.melee_icon)
{ {
/* goto BadLoad */ RDPtr->ship_info.melee_icon = CaptureDrawable (LoadGraphic (
RDPtr->ship_info.melee_icon_rsc));
if (!RDPtr->ship_info.melee_icon)
{
/* goto BadLoad */
}
} }
RDPtr->ship_info.race_strings = CaptureStringTable (LoadStringTable ( if (RDPtr->ship_info.race_strings_rsc != NULL_RESOURCE)
RDPtr->ship_info.race_strings_rsc));
if (!RDPtr->ship_info.race_strings)
{ {
/* goto BadLoad */ RDPtr->ship_info.race_strings = CaptureStringTable (LoadStringTable (
RDPtr->ship_info.race_strings_rsc));
if (!RDPtr->ship_info.race_strings)
{
/* goto BadLoad */
}
} }
if (LoadBattleData) if (LoadBattleData)