diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-01 18:06:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-02 01:32:02 +0300 |
commit | 5b93c6e6f34068274eecd42eb55dcdeab476f29b (patch) | |
tree | 52f1d0564c3c62ec5c6bbe74edacc822e352b306 /source/blender/editors/space_view3d/view3d_ruler.c | |
parent | d658ea1b209fe45b82bbbff1515f797659c3b022 (diff) |
Fix for 3D Ruler crash maximizing view
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_ruler.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ruler.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index 652f44ea95a..187b7aa2144 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -187,7 +187,6 @@ typedef struct RulerInfo { /* wm state */ wmWindow *win; - ScrArea *sa; ARegion *ar; void *draw_handle_pixel; } RulerInfo; @@ -798,7 +797,6 @@ static int view3d_ruler_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE op->customdata = ruler_info; ruler_info->win = win; - ruler_info->sa = sa; ruler_info->ar = ar; ruler_info->draw_handle_pixel = ED_region_draw_cb_activate(ar->type, ruler_info_draw_pixel, ruler_info, REGION_DRAW_POST_PIXEL); @@ -825,11 +823,11 @@ static int view3d_ruler_modal(bContext *C, wmOperator *op, const wmEvent *event) bool do_draw = false; int exit_code = OPERATOR_RUNNING_MODAL; RulerInfo *ruler_info = op->customdata; - ScrArea *sa = ruler_info->sa; + ScrArea *sa = CTX_wm_area(C); ARegion *ar = ruler_info->ar; RegionView3D *rv3d = ar->regiondata; - /* its possible to change spaces while running the operator [#34894] */ + /* its possible to change spaces while running the operator [#34894] */ if (UNLIKELY(ar != CTX_wm_region(C))) { exit_code = OPERATOR_FINISHED; goto exit; |