Browse Source

fix segfault in zbar init, issue #1059

283
ThomasV 10 years ago
parent
commit
1d885c11e0
  1. 7
      lib/qrscanner.py

7
lib/qrscanner.py

@ -17,8 +17,11 @@ def scan_qr(config):
device = config.get("video_device", "default")
if device == 'default':
device = ''
proc = zbar.Processor()
proc.init(video_device=device)
_proc = zbar.Processor()
_proc.init(video_device=device)
# set global only if init did not raise an exception
proc = _proc
proc.visible = True
while True:

Loading…
Cancel
Save