From DONOTREPLY at icculus.org Wed Feb 20 14:44:38 2013 From: DONOTREPLY at icculus.org (DONOTREPLY at icculus.org) Date: 20 Feb 2013 19:44:38 -0000 Subject: [rott-commits] r275 - trunk/rott Message-ID: <20130220194438.27452.qmail@icculus.org> Author: fabian Date: 2013-02-20 14:44:37 -0500 (Wed, 20 Feb 2013) New Revision: 275 Modified: trunk/rott/rt_actor.c Log: Fix a segfault in the Darian level, original bug report and patch by Luc Habert in Debian #700977. Modified: trunk/rott/rt_actor.c =================================================================== --- trunk/rott/rt_actor.c 2012-12-21 12:24:51 UTC (rev 274) +++ trunk/rott/rt_actor.c 2013-02-20 19:44:37 UTC (rev 275) @@ -251,7 +251,7 @@ {0,0,60,80,70,70,75,525,300,350,175,2800,3800,5900,4800,-1,350,2}}; -static statobj_t *touchsprite; +static statobj_t *touchsprite = NULL; static const byte dirdiff[8][8] = {{0,1,2,3,4,3,2,1},{1,0,1,2,3,4,3,2}, @@ -11070,7 +11070,7 @@ { #if (SHAREWARE == 0) case b_darianobj: - if (!DoPanicMapping()) + if (touchsprite && !DoPanicMapping()) touchsprite->flags |= FL_ACTIVE; if ((!sprites[PLAYER[0]->tilex][PLAYER[0]->tiley]) && (ob->areanumber == PLAYER[0]->areanumber)) {SpawnNewObj(PLAYER[0]->tilex,PLAYER[0]->tiley,&s_dspear1,spearobj);