Skip to content

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.

BUG:441122

Test Plan

Repeat the steps in the video attached to the bug report: https://bugsfiles.kde.org/attachment.cgi?id=140814

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Michał Chojnowski

Merge request reports

Loading