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++

Ensure view is only connected when it exists.

Wolthera van Hövell tot Westerflier04a9ed3040d7
diff --git a/libs/ui/KisTextPropertiesManager.cpp b/libs/ui/KisTextPropertiesManager.cpp
index b0510261ff..07524398e2 100644
--- a/libs/ui/KisTextPropertiesManager.cpp
+++ b/libs/ui/KisTextPropertiesManager.cpp
@@ -37,7 +37,9 @@ void KisTextPropertiesManager::setView(QPointer<KisView> imageView)
}
d->view = imageView;
- connect(d->view->canvasBase()->selectedShapesProxy(), SIGNAL(selectionChanged()), this, SLOT(slotShapeSelectionChanged()));
+ if (d->view) {
+ connect(d->view->canvasBase()->selectedShapesProxy(), SIGNAL(selectionChanged()), this, SLOT(slotShapeSelectionChanged()));
+ }
}
void KisTextPropertiesManager::setCanvasResourceProvider(KisCanvasResourceProvider *provider)