fix for crash canceling fly mode.
This commit is contained in:
@@ -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)
|
ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
|
||||||
{
|
{
|
||||||
return BKE_image_acquire_ibuf(ima, iuser, NULL);
|
return BKE_image_acquire_ibuf(ima, iuser, NULL);
|
||||||
|
|||||||
@@ -894,7 +894,9 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
{
|
{
|
||||||
int exit_code;
|
int exit_code;
|
||||||
short do_draw= FALSE;
|
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;
|
fly->redraw= 0;
|
||||||
|
|
||||||
@@ -909,10 +911,10 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
|
|
||||||
if(exit_code!=OPERATOR_RUNNING_MODAL)
|
if(exit_code!=OPERATOR_RUNNING_MODAL)
|
||||||
do_draw= TRUE;
|
do_draw= TRUE;
|
||||||
|
|
||||||
if(do_draw) {
|
if(do_draw) {
|
||||||
if(fly->rv3d->persp==RV3D_CAMOB) {
|
if(rv3d->persp==RV3D_CAMOB) {
|
||||||
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, fly->root_parent ? fly->root_parent : fly->v3d->camera);
|
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, fly_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
ED_region_tag_redraw(CTX_wm_region(C));
|
ED_region_tag_redraw(CTX_wm_region(C));
|
||||||
|
|||||||
Reference in New Issue
Block a user