Skip to content

Commit

Permalink
Fixed: SIGSEGV when attempting to prepare a model from a definition w…
Browse files Browse the repository at this point in the history
…hich uses the autoscale feature and the sprite it references can not be found.
  • Loading branch information
danij committed May 23, 2009
1 parent 1e7b0ae commit de9fe88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doomsday/engine/portable/src/r_things.c
Expand Up @@ -526,12 +526,16 @@ static void initSpriteDefs(const spriterecord_t** sprRecords, int num)
{
int frame;
const spriterecord_t* rec;
spritedef_t* sprDef;
spritedef_t* sprDef = &sprites[n];

if(!sprRecords[n])
{ // A record for a sprite we were unable to locate.
sprDef->numFrames = 0;
sprDef->spriteFrames = NULL;
continue;
}

rec = sprRecords[n];
sprDef = &sprites[n];

memset(sprTemp, -1, sizeof(sprTemp));
maxFrame = -1;
Expand Down

0 comments on commit de9fe88

Please sign in to comment.