# HG changeset patch # User dirk # Date 1316532063 -7200 # Node ID a6388599b1062d92bac3a24c24d05fafc409a072 # Parent 56cf93ee85f40d020b972578cca253df5a1501d2 do not blindly cast to Component ... the source of the event may be some arbitrary object (e.g. a model) diff -r 56cf93ee85f4 -r a6388599b106 conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ExceptionHandlingListSelectionListener.java --- a/conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ExceptionHandlingListSelectionListener.java Tue Sep 20 17:00:45 2011 +0200 +++ b/conflict-editor/src/main/java/de/codedo/conflicteditor/gui/ExceptionHandlingListSelectionListener.java Tue Sep 20 17:21:03 2011 +0200 @@ -27,7 +27,12 @@ catch (Exception ex) { String stacktrace = ExceptionUtil.toString(ex); - Component source = (Component)event.getSource(); + + Component source = null; + if (event.getSource() instanceof Component) + { + source = (Component)event.getSource(); + } JOptionPane.showMessageDialog(source, stacktrace, "Error", JOptionPane.ERROR_MESSAGE); } }