fix possible crash (seen in crashlog)
[enigma2.git] / lib / python / Plugins / SystemPlugins / SoftwareManager / plugin.py
index 85d23284d453f7e99d271b1268c786909137684c..81e1e9f9c7da2ac7cdcecd9b983dc178a36837fa 100755 (executable)
@@ -342,7 +342,7 @@ class PacketManager(Screen):
                self.onShown.append(self.setWindowTitle)
                self.onLayoutFinish.append(self.rebuildList)
                self.onClose.append(self.cleanup)
                self.onShown.append(self.setWindowTitle)
                self.onLayoutFinish.append(self.rebuildList)
                self.onClose.append(self.cleanup)
-               
+
        def cleanup(self):
                self.ipkg.stop()
                if self.Console is not None:
        def cleanup(self):
                self.ipkg.stop()
                if self.Console is not None:
@@ -448,6 +448,8 @@ class PacketManager(Screen):
                        for x in result.splitlines():
                                split = x.split(' - ')
                                self.packetlist.append([split[0].strip(), split[1].strip(),split[2].strip()])
                        for x in result.splitlines():
                                split = x.split(' - ')
                                self.packetlist.append([split[0].strip(), split[1].strip(),split[2].strip()])
+               if not self.Console:
+                       self.Console = Console()
                cmd = "ipkg list_installed"
                self.Console.ePopen(cmd, self.IpkgListInstalled_Finished)
 
                cmd = "ipkg list_installed"
                self.Console.ePopen(cmd, self.IpkgListInstalled_Finished)