Created attachment 140814 [details] Bug reproduction video SUMMARY After deleting a gamut mask (or cancelling the creation of a new gamut mask), using the gamut mask toggle button in the gamut mask toolbar (available in circular artistic color selectors) causes a segfault. This is because the toolbar attempts to dereference a pointer to the deleted gamut mask. This pointer should be nulled when the mask is unset. STEPS TO REPRODUCE See the attached video. OBSERVED RESULT Segmentation fault. EXPECTED RESULT No crash. SOFTWARE/OS VERSIONS Irrelevant.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1006
Git commit 893b4bef8ae66d9f127a962441e0b08d0d09b7dc by Halla Rempt, on behalf of Michał Chojnowski. Committed on 18/08/2021 at 09:36. Pushed by rempt into branch 'krita/5.0'. Fix a segfault in gamut mask toolbar After deleting a gamut mask (or cancelling the creation of a new gamut mask), using the gamut mask toggle button in the gamut mask toolbar (available in circular artistic color selectors) causes a segfault. This is because the toolbar attempts to dereference a pointer to the deleted gamut mask. This pointer should be nulled when the mask is unset. (cherry picked from commit 27fdf04dbc33719ac5d7df1ac86176bee3df807d) M +1 -0 libs/ui/widgets/KisGamutMaskToolbar.cpp https://invent.kde.org/graphics/krita/commit/893b4bef8ae66d9f127a962441e0b08d0d09b7dc