Commit b0275f3e authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check pointers before dereferencing

BUG:393287
parent 0806ff8e
......@@ -68,7 +68,7 @@ void GridDockerDock::setCanvas(KoCanvasBase * canvas)
m_canvas = canvas ? dynamic_cast<KisCanvas2*>(canvas) : 0;
setEnabled(m_canvas);
if (m_canvas) {
if (m_canvas && m_canvas->viewManager() && m_canvas->viewManager()->document()) {
m_canvasConnections.addConnection(
m_canvas->viewManager()->gridManager(),
SIGNAL(sigRequestUpdateGridConfig(const KisGridConfig&)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment