SaveTool: fix a segfault.
This commit is contained in:
parent
dd9dcdb5f6
commit
4ae9f83ab3
1 changed files with 5 additions and 3 deletions
|
@ -375,6 +375,11 @@ void SaveTool::updateCheckEvent(SDL_Event& event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveTool::fileUpdateEvent(SDL_Event& event) {
|
void SaveTool::fileUpdateEvent(SDL_Event& event) {
|
||||||
|
if(event.user.code == StagedUpdate) {
|
||||||
|
_massManager->refreshStagedMasses();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Containers::String filename{static_cast<char*>(event.user.data1), std::strlen(static_cast<char*>(event.user.data1)), nullptr};
|
Containers::String filename{static_cast<char*>(event.user.data1), std::strlen(static_cast<char*>(event.user.data1)), nullptr};
|
||||||
Containers::String old_filename;
|
Containers::String old_filename;
|
||||||
|
|
||||||
|
@ -444,9 +449,6 @@ void SaveTool::fileUpdateEvent(SDL_Event& event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case StagedUpdate:
|
|
||||||
_massManager->refreshStagedMasses();
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
_queue.addToast(Toast::Type::Warning, "Unknown file action type"_s);
|
_queue.addToast(Toast::Type::Warning, "Unknown file action type"_s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue