Skip to content

Commit

Permalink
Avoid crashing due to empty case in plotter configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Jan 3, 2024
1 parent 9df8d9c commit d8b53bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ert/gui/tools/plot/customize/customize_plot_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def toggleCustomizationDialog(self):
self._customization_dialog.show()

def switchPlotConfigHistory(self, key_def):
if key_def is None:
return
key = key_def["key"]
if key != self._plot_config_key:
if key not in self._plot_configs:
Expand Down
2 changes: 2 additions & 0 deletions src/ert/gui/tools/plot/plot_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def addDock(
@showWaitCursorWhileWaiting
def keySelected(self):
key_def = self.getSelectedKey()
if key_def is None:
return
self._plot_customizer.switchPlotConfigHistory(key_def)

available_widgets = [
Expand Down

0 comments on commit d8b53bb

Please sign in to comment.