When closing the SimulationView while it is displaying a machine, the
content provider still had its ActiveMicroInstructionChangedListener
registered in this machine, causing updateElement to be called when the
machine does a cycle, causing the log to be spammed with exceptions
@Override
public void updateElement(int index)
{
- if (activeRow != null)
+ if (activeRow != null && !viewer.getControl().isDisposed())
viewer.replace(activeRow, index);
}
}
public void dispose()
{
deregisterMachineDependentListeners();
+ contentProvider.setMachine(null);
DebugUITools.getDebugContextManager().removeDebugContextListener(debugContextListener);
super.dispose();
}