Recolor Marker Crash Issue Fixed

Closes #5976 (closed)

Crash Location: src/ui/widgets/recolor-art.cpp

Root Cuase

inside the onResetClicked() function we get the selected color using _selection_model->get_selected(); but don't handle the case where ColorList is empty.

Solution

Gtk handles the empty list case itself by returning GTK_INVALID_LIST_POSITION if the list is empty.

The following check is added to onResetClicked() function to mitigate the issue (line 543):

	if(index == GTK_INVALID_LIST_POSITION) return;

This one line fixes the crash while maintaining rest of the functionalities.

After Fix:

pr.mp4

Merge request reports

Loading