WebBrowser/WebBrowserWindow.py

changeset 6085
7e48a0d98cce
parent 6048
82ad8ec9548c
child 6089
ca484325f02a
--- a/WebBrowser/WebBrowserWindow.py	Wed Jan 24 12:37:53 2018 +0100
+++ b/WebBrowser/WebBrowserWindow.py	Wed Jan 24 18:45:50 2018 +0100
@@ -2873,7 +2873,7 @@
         if not self.__fromEric:
             Preferences.syncPreferences()
             if not WebBrowserWindow._performingShutdown and \
-                    len(WebBrowserWindow.BrowserWindows) == 0:
+                    len(WebBrowserWindow.BrowserWindows) == 1:
                 # shut down the browser in case the last window was
                 # simply closed
                 self.shutdown()
@@ -2926,14 +2926,16 @@
         if not self.__shallShutDown():
             return False
         
-        if not self.downloadManager().allowQuit():
+        if WebBrowserWindow._downloadManager is not None and \
+                not self.downloadManager().allowQuit():
             return False
         
         WebBrowserWindow._performingShutdown = True
         
         self.sessionManager().shutdown()
         
-        self.downloadManager().shutdown()
+        if WebBrowserWindow._downloadManager is not None:
+            self.downloadManager().shutdown()
         
         self.cookieJar().close()
         

eric ide

mercurial