From 04c3a912e82d06c4ae06c639b8a8f7e26bda75fe Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 3 Jun 2014 15:19:48 +0200 Subject: [PATCH] Uninstall Qt message handler on quit. This caused segfaults while exiting for some reason. --- qutebrowser/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 4be7e963c..f293be7e8 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -39,7 +39,8 @@ from argparse import ArgumentParser from base64 import b64encode from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox -from PyQt5.QtCore import pyqtSlot, QTimer, QEventLoop, Qt, QStandardPaths +from PyQt5.QtCore import (pyqtSlot, QTimer, QEventLoop, Qt, QStandardPaths, + qInstallMessageHandler) import qutebrowser import qutebrowser.commands.utils as cmdutils @@ -642,6 +643,8 @@ class QuteBrowser(QApplication): os.remove(self._crashlogfile.name) except PermissionError: pass + # If we don't kill our custom handler here we might get segfaults + qInstallMessageHandler(None) self._maybe_quit('main') @pyqtSlot()