From 6a7d43cb84b0df0756b82943d777edd28b4f2049 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 8 Dec 2010 16:47:10 +0200 Subject: [PATCH] Fixed a traceback in characterEditor caused when trying to add an implant while implants/booster tree has no item selected --- gui/characterEditor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index fdd7de3c1..9b8a1eab2 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -492,6 +492,10 @@ class ImplantsTreeView (wx.Panel): def addImplant(self, event): root = self.availableImplantsTree.GetSelection() + + if not root.IsOk(): + return + nchilds = self.availableImplantsTree.GetChildrenCount(root) cChar = service.Character.getInstance() charID = self.Parent.Parent.getActiveCharacter()