Bugfix #17622: clicking on action IPO in outliner causes crash

In some cases, no action channels existed, but yet the Outliner displayed some that, when clicked on, would cause a crash.
This commit is contained in:
Joshua Leung
2008-09-16 06:33:59 +00:00
parent 0f39be9ce8
commit 18cda1583d

View File

@@ -1640,7 +1640,8 @@ static int tree_element_active_ipo(SpaceOops *soops, TreeElement *te, int set)
if(chan->ipo) a++;
}
deselect_actionchannels(ob->action, 0);
select_channel(ob->action, chan, SELECT_ADD);
if (chan)
select_channel(ob->action, chan, SELECT_ADD);
allqueue(REDRAWACTION, ob->ipowin);
allqueue(REDRAWVIEW3D, ob->ipowin);
}