diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index 4b0517c3e0..53136743d9 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -301,8 +301,7 @@ namespace MWGui if (mSaving) { - std::string_view nameAsStringView = std::basic_string_view(mSaveNameEdit->getCaption().asUTF8().c_str()); - MWBase::Environment::get().getStateManager()->saveGame(nameAsStringView, mCurrentSlot); + MWBase::Environment::get().getStateManager()->saveGame(mSaveNameEdit->getCaption().asUTF8(), mCurrentSlot); } else {