diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index 605e9a2f57..10e2ae32fc 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -427,6 +427,10 @@ namespace MWGui mInfoText->setCaptionWithReplacing(text.str()); + // Reset the image for the case we're unable to recover a screenshot + mScreenshotTexture.reset(); + mScreenshot->setRenderItemTexture(nullptr); + mScreenshot->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f)); // Decode screenshot const std::vector& data = mCurrentSlot->mProfile.mScreenshot; @@ -463,8 +467,6 @@ namespace MWGui texture->setUnRefImageDataAfterApply(true); mScreenshotTexture = std::make_unique(texture); - mScreenshot->setRenderItemTexture(mScreenshotTexture.get()); - mScreenshot->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f)); } }