From: divverent Date: Fri, 20 Mar 2009 16:50:58 +0000 (+0000) Subject: remove two mysterious crashes (although I don't know why it was broken to begin with) X-Git-Tag: svn-r421~197 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ecfd6813e3ddaccc620ac883dc6247790deba2ea;p=xonotic%2Fnetradiant.git remove two mysterious crashes (although I don't know why it was broken to begin with) git-svn-id: svn://svn.icculus.org/netradiant/trunk@223 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/radiant/entity.cpp b/radiant/entity.cpp index 7a08d098..c9d00e40 100644 --- a/radiant/entity.cpp +++ b/radiant/entity.cpp @@ -195,7 +195,8 @@ public: } void post(const scene::Path& path, scene::Instance& instance) const { - if(Instance_getSelectable(instance)->isSelected()) + Selectable *selectable = Instance_getSelectable(instance); + if(selectable && selectable->isSelected()) { Entity* entity = Node_getEntity(path.top()); if(entity == 0 && Node_isPrimitive(path.top())) diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 82968420..c7c8363d 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -181,6 +181,7 @@ mapDrawSurface_t *MakeCelSurface( mapDrawSurface_t *src, shaderInfo_t *si ) /* do some fixups for celshading */ ds->planar = qfalse; ds->planeNum = -1; + ds->celShader = NULL; /* don't cel shade cels :P */ /* return the surface */ return ds;