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:
+22
-13
@@ -71,25 +71,34 @@ load_ship (SPECIES_ID SpeciesID, BOOLEAN LoadBattleData)
|
||||
goto BadLoad;
|
||||
RDPtr->CodeRef = CodeRef;
|
||||
|
||||
RDPtr->ship_info.icons = CaptureDrawable (LoadGraphic (
|
||||
RDPtr->ship_info.icons_rsc));
|
||||
if (!RDPtr->ship_info.icons)
|
||||
if (RDPtr->ship_info.icons_rsc != NULL_RESOURCE)
|
||||
{
|
||||
/* 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 (
|
||||
RDPtr->ship_info.melee_icon_rsc));
|
||||
if (!RDPtr->ship_info.melee_icon)
|
||||
|
||||
if (RDPtr->ship_info.melee_icon_rsc != NULL_RESOURCE)
|
||||
{
|
||||
/* 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 (
|
||||
RDPtr->ship_info.race_strings_rsc));
|
||||
if (!RDPtr->ship_info.race_strings)
|
||||
if (RDPtr->ship_info.race_strings_rsc != NULL_RESOURCE)
|
||||
{
|
||||
/* 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)
|
||||
|
||||
Reference in New Issue
Block a user