mirror of https://github.com/rusefi/RomRaider.git
Fix for issue #20 on the github list. No refactoring, and since it's on closing, refactoring seems unnecessary. All we're trying to do is save the divider location, so make sure there is one
- Check if the component is a JSplitPane before trying to cast as one
This commit is contained in:
parent
9ceb701e48
commit
147f433c07
|
@ -1392,8 +1392,11 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
|
|||
settings.setLoggerWindowLocation(getLocation());
|
||||
if (settings.getLoggerParameterListState()) {
|
||||
final Component c = tabbedPane.getSelectedComponent();
|
||||
final JSplitPane sp = (JSplitPane) c.getComponentAt(100, 100);
|
||||
settings.setLoggerDividerLocation(sp.getDividerLocation());
|
||||
if (c instanceof JSplitPane) {
|
||||
// Only save the divider location if there is one
|
||||
final JSplitPane sp = (JSplitPane) c.getComponentAt(100, 100);
|
||||
settings.setLoggerDividerLocation(sp.getDividerLocation());
|
||||
}
|
||||
}
|
||||
settings.setLoggerSelectedTabIndex(tabbedPane.getSelectedIndex());
|
||||
settings.setLoggerPluginPorts(getPluginPorts(externalDataSources));
|
||||
|
|
Loading…
Reference in New Issue