From 0fbc0d0da775523b1d9e62d3d2166c6c352a2d4e Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 14 Aug 2016 16:41:17 +0200 Subject: [PATCH] Attempt to silence warning --- apps/openmw/mwgui/windowbase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/windowbase.cpp b/apps/openmw/mwgui/windowbase.cpp index c9d1b0617..99b74529e 100644 --- a/apps/openmw/mwgui/windowbase.cpp +++ b/apps/openmw/mwgui/windowbase.cpp @@ -79,12 +79,13 @@ void WindowModal::close() NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget) : mWidget(widget), mDrag(drag), mTransparent(false) { - if (!mWidget) - throw std::runtime_error("NoDrop needs a non-NULL widget!"); } void NoDrop::onFrame(float dt) { + if (!mWidget) + return; + MyGUI::IntPoint mousePos = MyGUI::InputManager::getInstance().getMousePosition(); if (mDrag->mIsOnDragAndDrop) @@ -113,5 +114,6 @@ void NoDrop::onFrame(float dt) void NoDrop::setAlpha(float alpha) { - mWidget->setAlpha(alpha); + if (mWidget) + mWidget->setAlpha(alpha); }