summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r--src/gui/shortcutwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 87b43e758..8bd64c9ff 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -74,7 +74,8 @@ ShortcutWindow::ShortcutWindow(const std::string &title,
mDragOffsetY = 0;
content->setWidget2(this);
- setupWindow->registerWindowForReset(this);
+ if (setupWindow)
+ setupWindow->registerWindowForReset(this);
const int border = SCROLL_PADDING * 2 + getPadding() * 2;
setMinWidth(mItems->getBoxWidth() + border);
@@ -123,7 +124,8 @@ ShortcutWindow::ShortcutWindow(const std::string &title,
mDragOffsetX = 0;
mDragOffsetY = 0;
- setupWindow->registerWindowForReset(this);
+ if (setupWindow)
+ setupWindow->registerWindowForReset(this);
const int border = SCROLL_PADDING * 2 + getPadding() * 2;