URI: 
       tBe careful removing windows from the list - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit d5aa6466c9da6badbe0f9ccc31c7329d836bcfed
   DIR parent 986e198e87f80153b3c1c4bdda3bdd93c1e60769
  HTML Author: Neil Booth <kyuupichan@gmail.com>
       Date:   Mon, 11 Jan 2016 22:32:19 +0900
       
       Be careful removing windows from the list
       
       I've occasionally had Python throw saying the window
       isn't in the list.
       
       Diffstat:
         M gui/qt/__init__.py                  |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py
       t@@ -163,13 +163,16 @@ class ElectrumGui:
                return w
        
            def close_window(self, window):
       -        self.windows.remove(window)
       +        # It seems that in some cases this can be called before the
       +        # window is added to the windows list...
       +        if window in self.windows:
       +            self.windows.remove(window)
       +            run_hook('on_close_window', window)
                self.build_tray_menu()
                # save wallet path of last open window
                if self.config.get('wallet_path') is None and not self.windows:
                    path = window.wallet.storage.path
                    self.config.set_key('gui_last_wallet', path)
       -        run_hook('on_close_window', window)
        
            def main(self):
                self.timer.start()