Browse Source

Fix exceptions on PyQt5 crashing entire application

tags/1.9.8
falkTX 7 years ago
parent
commit
c7690ad759
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      source/carla_host.py

+ 9
- 0
source/carla_host.py View File

@@ -60,6 +60,12 @@ try:
except:
hasGL = False

# ------------------------------------------------------------------------------------------------------------
# Safe exception hook, needed for PyQt5

def sys_excepthook(type, value, tback):
return sys.__excepthook__(type, value, tback)

# ------------------------------------------------------------------------------------------------------------
# Session Management support

@@ -2492,6 +2498,9 @@ def initHost(initName, libPrefix, isControl, isPlugin, failError, HostClass = No
sys.stdout = CarlaPrint(False)
sys.stderr = CarlaPrint(True)

if config_UseQt5:
sys.excepthook = sys_excepthook

# --------------------------------------------------------------------------------------------------------
# Done



Loading…
Cancel
Save