Safari build crashes when "zooming into"/choosing a tab from tab view
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / mac / WKView.mm
index 6be87bf..9d1e9c1 100644 (file)
@@ -4104,8 +4104,8 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if (ignoresNonWheelEvents)
         [self removeGestureRecognizer:_data->_immediateActionGestureRecognizer.get()];
-    else
-        [self addGestureRecognizer:_data->_immediateActionGestureRecognizer.get()];
+    else if (NSGestureRecognizer *immediateActionRecognizer = _data->_immediateActionGestureRecognizer.get())
+        [self addGestureRecognizer:immediateActionRecognizer];
 #endif
 }