[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15159] trunk/blender/source/blender/src/ drawipo.c: Bugfix #13649: Segmentation fault when deleting object
Joshua Leung
aligorith at gmail.com
Sun Jun 8 11:35:06 CEST 2008
Revision: 15159
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15159
Author: aligorith
Date: 2008-06-08 11:35:05 +0200 (Sun, 08 Jun 2008)
Log Message:
-----------
Bugfix #13649: Segmentation fault when deleting object
When the IPO editor was pinned, and the active object was changed, deleting the active object would cause a crash.
Modified Paths:
--------------
trunk/blender/source/blender/src/drawipo.c
Modified: trunk/blender/source/blender/src/drawipo.c
===================================================================
--- trunk/blender/source/blender/src/drawipo.c 2008-06-08 03:39:24 UTC (rev 15158)
+++ trunk/blender/source/blender/src/drawipo.c 2008-06-08 09:35:05 UTC (rev 15159)
@@ -1712,7 +1712,7 @@
/* is used for both read and write... */
static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float max)
{
- Object *ob= OBACT;
+ Object *ob;
EditIpo *ei;
BezTriple *bezt;
float median[3];
@@ -1721,6 +1721,12 @@
median[0]= median[1]= median[2]= 0.0;
tot= 0;
+ /* use G.sipo->from (which should be an object) so that pinning ipo's will still work ok */
+ if((G.sipo->from) && (GS(G.sipo->from->name) == ID_OB))
+ ob= (Object *)(G.sipo->from);
+ else
+ ob= OBACT;
+
ei= G.sipo->editipo;
for(a=0; a<G.sipo->totipo; a++, ei++) {
More information about the Bf-blender-cvs
mailing list