From 13cca461f22b3b336c72e1687207b8d0c1d3345c Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 23 Oct 2024 22:23:28 +0300 Subject: [PATCH] Maybe fix #8202 --- apps/openmw/mwgui/dialogue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } }