Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Fixed crashes when savegame contains invalid slot nodes.

  • Loading branch information...
commit baa3f7ef2f772a1bb12d5327bfc7ad79d2d41064 1 parent ea45f3c
@bobbens bobbens authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/player.c
View
8 src/player.c
@@ -3423,8 +3423,14 @@ static void player_parseShipSlot( xmlNodePtr node, Pilot *ship, PilotOutfitSlot
char *buf;
int q;
+ char *name = xml_get(node);
+ if (name == NULL) {
+ WARN("Empty ship slot node found, skipping.");
+ return;
+ }
+
/* Add the outfit. */
- o = outfit_get( xml_get(node) );
+ o = outfit_get( name );
if (o==NULL)
return;
player_addOutfitToPilot( ship, o, slot );
Please sign in to comment.
Something went wrong with that request. Please try again.