--- a/WebBrowser/WebInspector.py Sat Feb 27 20:51:44 2016 +0100 +++ b/WebBrowser/WebInspector.py Sun Feb 28 12:48:12 2016 +0100 @@ -47,12 +47,6 @@ self.page().windowCloseRequested.connect(self.close) self.page().loadFinished.connect(self.__loadFinished) - def __del__(self): - """ - Special method doing some cleanup stuff. - """ - unregisterView(self) - def closeEvent(self, evt): """ Protected method to save the geometry when closed. @@ -155,6 +149,9 @@ @param view reference to the view @type WebBrowserView """ + if _VIEWS is None: + return + _VIEWS.insert(0, view) @@ -165,6 +162,9 @@ @param view reference to the view @type WebBrowserView """ + if _VIEWS is None: + return + if view in _VIEWS: _VIEWS.remove(view) @@ -176,6 +176,9 @@ @param view reference to the view @type WebBrowserView """ + if _VIEWS is None: + return + if view in _VIEWS: _VIEWS.remove(view) _VIEWS.insert(0, view)