Fix crash on exit by uninstalling Qt message handler

If we don't uninstall the message handler before exiting,
if Qt has messages to send after the python application side
has been destroyed, Qt will crash trying to call the python interpreter.

One examples of such messages are the ones that are enabled through
QT_DEBUG_PLUGINS, which report the libraries that get unloaded.
This commit is contained in:
Stefano Bonicatti 2023-12-27 22:17:55 +01:00 committed by Rebecca
parent f6b4c9491b
commit c6a68116e6

View file

@ -123,6 +123,7 @@ def main():
del bee
del app
logger.debug('BeeRef closed')
QtCore.qInstallMessageHandler(None)
if __name__ == '__main__':