Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 15bf626

Browse files
committed
Update preview_camerax.py
1 parent 18ca802 commit 15bf626

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/camera4kivy/preview_camerax.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ def set_facing(self, facing):
186186
# CommonGestures Touch Events
187187
# tap for focus
188188
def cg_tap(self, touch, x, y):
189-
if self.enable_focus_gesture:
189+
if self._camera and self.enable_focus_gesture:
190190
self.focus(x, y)
191191

192192
# pinch/spread for zoom
193193
def cg_scale(self, touch0, touch1, scale, x, y):
194-
if self.enable_zoom_gesture:
194+
if self._camera and self.enable_zoom_gesture:
195195
self.zoom_delta(scale)
196196

197197
##############################

0 commit comments

Comments
 (0)