Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-06-08 13:35:05 +0400
committerJoshua Leung <aligorith@gmail.com>2008-06-08 13:35:05 +0400
commit08f9bcf8ece2ded4cc95a3c5b982c316e72da865 (patch)
tree69b1769c7fd457089b86bb2d308df65288ef95e9 /source/blender/src/drawipo.c
parent7e095fa695247996a678504bcace0c1d5ab00db2 (diff)
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.
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r--source/blender/src/drawipo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 552e87a57d1..0e7476bbe82 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -1712,7 +1712,7 @@ static void boundbox_ipo_curves(SpaceIpo *si)
/* 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 @@ static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float m
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++) {