Skip to content

Commit

Permalink
Merge pull request #7727 from SomberNight/202203_qtcamera_preferences…
Browse files Browse the repository at this point in the history
…_crash

qt gui: (maybe fix) opening "Preferences" segfaults on macOS for some
  • Loading branch information
SomberNight authored Mar 22, 2022
2 parents 5149ee0 + d8e2582 commit 483fed4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions electrum/gui/qt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
from PyQt5.QtCore import QObject, pyqtSignal, QTimer, Qt
import PyQt5.QtCore as QtCore

try:
# Preload QtMultimedia at app start, if available.
# We use QtMultimedia on some platforms for camera-handling, and
# lazy-loading it later led to some crashes. Maybe due to bugs in PyQt5. (see #7725)
from PyQt5.QtMultimedia import QCameraInfo; del QCameraInfo
except ImportError as e:
pass # failure is ok; it is an optional dependency.

from electrum.i18n import _, set_language
from electrum.plugin import run_hook
from electrum.base_wizard import GoBack
Expand Down

0 comments on commit 483fed4

Please sign in to comment.