Commit 79f44ba0 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check pointer before dereferencing

BUG:421081
(cherry picked from commit abac7729eed0abf50da65a01575c2f937c3cabc0)
parent 10d47bd6
......@@ -512,9 +512,8 @@ KisMainWindow::KisMainWindow(QUuid uuid)
QList<QAction *> toolbarList;
Q_FOREACH (QWidget* it, guiFactory()->containers("ToolBar")) {
KToolBar * toolBar = ::qobject_cast<KToolBar *>(it);
toolBar->setMovable(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));
if (toolBar) {
toolBar->setMovable(KisConfig(true).readEntry<bool>("LockAllDockerPanels", false));
if (toolBar->objectName() == "BrushesAndStuff") {
toolBar->setEnabled(false);
}
......
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