Check if projected / command thing actually exist before attempting to remove it

This commit is contained in:
blitzmann
2017-05-18 22:07:59 -04:00
committed by Ryan Holmes
parent 3be7538daa
commit 00dcda6fad
2 changed files with 8 additions and 4 deletions

View File

@@ -214,5 +214,7 @@ class CommandView(d.Display):
if col != self.getColIndex(State):
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
sFit.removeCommand(fitID, self.get(row))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
thing = self.get(row)
if thing: # thing doesn't exist if it's the dummy value
sFit.removeCommand(fitID, thing)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))