Skip to content

Issue #11969: fix colormap detach/close crash due to editor->selection being NULL

Unlike the other actions_update () functions, the colormap_actions_update () function calls gimp_colormap_editor_is_color_deletable (), which checks if the selection's color is deletable or not.

Due to the editor->selection being set AFTER the parent dock's set_context () function is being called, it remains NULL when colormap_actions_update () gets called. This patch aims to fix that by first allowing setting editor->selection and then calling the parent dock's set_context () function.

We could potentially move the parent's set_context () function to inside the if (context) check, but I left it outside because it was outside before, whatever works?

Merge request reports