diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 2e052de768..6f154bb134 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -816,8 +816,10 @@ namespace MWGui if (changed) { button->setCaption(oldCaption); - button->getSubWidgetText()->setWordWrap(true); - button->getSubWidgetText()->setTextAlign(MyGUI::Align::Left); + button->setTextAlign(MyGUI::Align::Left); + MyGUI::ISubWidgetText* text = button->getSubWidgetText(); + if (text != nullptr) + text->setWordWrap(true); button->setSize(oldSize); } }