fix for crash canceling fly mode.

This commit is contained in:
2010-11-24 16:54:18 +00:00
parent 117d11021e
commit bc9f1642bd
2 changed files with 7 additions and 4 deletions

View File

@@ -2169,6 +2169,7 @@ void BKE_image_release_ibuf(Image *ima, void *lock)
}
}
/* warning, this can allocate generated images */
ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
{
return BKE_image_acquire_ibuf(ima, iuser, NULL);

View File

@@ -894,7 +894,9 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
{
int exit_code;
short do_draw= FALSE;
FlyInfo *fly = op->customdata;
FlyInfo *fly= op->customdata;
RegionView3D *rv3d= fly->rv3d;
Object *fly_object= fly->root_parent ? fly->root_parent : fly->v3d->camera;
fly->redraw= 0;
@@ -909,10 +911,10 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
if(exit_code!=OPERATOR_RUNNING_MODAL)
do_draw= TRUE;
if(do_draw) {
if(fly->rv3d->persp==RV3D_CAMOB) {
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, fly->root_parent ? fly->root_parent : fly->v3d->camera);
if(rv3d->persp==RV3D_CAMOB) {
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, fly_object);
}
ED_region_tag_redraw(CTX_wm_region(C));