From 60d90692e487948b77edcac63acbef34254cea5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 Aug 2013 16:06:19 +0300 Subject: remove duplicate variables. --- src/gui/widgets/dropdown.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/dropdown.cpp') diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 0b67958df..9845c295c 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -76,7 +76,6 @@ DropDown::DropDown(const Widget2 *const widget, mPadding(1), mImagePadding(2), mSpacing(0), - mForegroundColor2(getThemeColor(Theme::DROPDOWN_OUTLINE)), mFoldedUpHeight(0), mSelectionListeners(), mExtended(extended), @@ -85,6 +84,7 @@ DropDown::DropDown(const Widget2 *const widget, mIsDragged(false) { mFrameSize = 2; + mForegroundColor2 = getThemeColor(Theme::DROPDOWN_OUTLINE); mPopup->setHeight(100); @@ -455,6 +455,8 @@ void DropDown::dropDown() { if (!mDroppedDown) { + if (!mParent) + return; mDroppedDown = true; mFoldedUpHeight = getHeight(); adjustHeight(); @@ -462,7 +464,7 @@ void DropDown::dropDown() int x = 0; int y = 0; getAbsolutePosition(x, y); - const int frame = getParent()->getFrameSize(); + const int frame = mParent->getFrameSize(); const int pad = mPopup->getPadding(); const int pad2 = pad * 2; -- cgit v1.2.3-70-g09d2