Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Test pointer in WGColorPatches now we sometimes set those to nullptr.

Wolthera van Hövell tot Westerflier6bab33db8ded
diff --git a/plugins/dockers/widegamutcolorselector/WGColorPatches.cpp b/plugins/dockers/widegamutcolorselector/WGColorPatches.cpp
index 3e8520b48d..b3f8918838 100644
--- a/plugins/dockers/widegamutcolorselector/WGColorPatches.cpp
+++ b/plugins/dockers/widegamutcolorselector/WGColorPatches.cpp
@@ -516,7 +516,9 @@ void WGColorPatches::reconnectButtons(KisUniqueColorSet *oldSet, KisUniqueColorS
if (oldSet) {
clearButton->disconnect(oldSet);
}
- connect(clearButton, SIGNAL(clicked(bool)), newSet, SLOT(clear()));
+ if (newSet) {
+ connect(clearButton, SIGNAL(clicked(bool)), newSet, SLOT(clear()));
+ }
}
else if (m_preset == CommonColors && !m_buttonList.isEmpty()) {
QToolButton *reloadButton = m_buttonList.first();