[Bf-blender-cvs] [cac8a7cddb5] master: Fix for T65714: Pinch Zooming Crash using Mac Trackpad

Yevgeny Makarov noreply at git.blender.org
Thu Oct 29 00:41:52 CET 2020


Commit: cac8a7cddb56a654145ed1c9db2add8abff12704
Author: Yevgeny Makarov
Date:   Wed Oct 28 16:40:28 2020 -0700
Branches: master
https://developer.blender.org/rBcac8a7cddb56a654145ed1c9db2add8abff12704

Fix for T65714: Pinch Zooming Crash using Mac Trackpad

Ensure that Zoom does not crash on Mac Trackpad by checking for existence of Continuous Zoom timer.

Differential Revision: https://developer.blender.org/D8682

Reviewed by Julian Eisel

===================================================================

M	source/blender/editors/interface/view2d_ops.c

===================================================================

diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index e4a7ad0d635..66194cf8783 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1121,8 +1121,9 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op)
     dy *= -1;
   }
 
-  /* continuous zoom shouldn't move that fast... */
-  if (U.viewzoom == USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */
+  /* Check if the 'timer' is initialized, as zooming with the trackpad
+   * never uses the "Continuous" zoom method, and the 'timer' is not initialized. */
+  if ((U.viewzoom == USER_ZOOM_CONT) && vzd->timer) { /* XXX store this setting as RNA prop? */
     const double time = PIL_check_seconds_timer();
     const float time_step = (float)(time - vzd->timer_lastdraw);



More information about the Bf-blender-cvs mailing list