From 3a4843f4219a36ed47fcf525d31744b7e10f368d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Tue, 18 Sep 2018 16:33:09 +0200 Subject: [PATCH] security check on parent widget (just in case) --- src/gui/UBDockPalette.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/UBDockPalette.cpp b/src/gui/UBDockPalette.cpp index 7ee22ef5..e78a50d6 100644 --- a/src/gui/UBDockPalette.cpp +++ b/src/gui/UBDockPalette.cpp @@ -510,10 +510,13 @@ void UBDockPalette::moveTabs() int y = border(); if(eUBDockTabOrientation_Down == mTabsOrientation) { - if (mOrientation == eUBDockOrientation_Right) - y = parentWidget()->height() - border()- mTabWidgets.size() * TABSIZE; - else - y = height() - border()- mTabWidgets.size() * TABSIZE; + if (mOrientation == eUBDockOrientation_Right) + { + if (parentWidget()) + y = parentWidget()->height() - border()- mTabWidgets.size() * TABSIZE; + } + else + y = height() - border()- mTabWidgets.size() * TABSIZE; } mHTab = y;