Skip to content

Fix a segfault in Swatches – issue #3221

Rafał Siejakowski requested to merge S-Rafael/inkscape:swatches-rclick into master

As reported in the linked issue, when the user closes any Swatches panel and then right-clicks on another Swatches panel (no matter if it's in the same document), Inkscape segfaults.

This MR fixes the crash by preventing the storage of a stale pointer to a destroyed Swatches panel in the std::map which keeps track of which panel belongs to which document.

Fixes #3221 (closed)

Merge request reports