Skip to content

Commit

Permalink
Fixed an issue where the app would crash if the same project was load…
Browse files Browse the repository at this point in the history
…ed twice from Google Drive.
  • Loading branch information
98ahni committed Oct 7, 2024
1 parent d811d2f commit 5b844f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ extern "C" EMSCRIPTEN_KEEPALIVE void LoadFileFromGoogleDrive(emscripten::EM_VAL
printf("Loaded project '%s' with file id: %s\n", path.string().data(), id.data());
if(path.extension() == ".txt")
{
Serialization::Preferences::SetString("Document/FileID", id);
Serialization::KaraokeDocument::Get().Load(path.string(), id, false);
}
else if(path.extension() == ".mp3")
Expand Down Expand Up @@ -141,6 +140,7 @@ void loop(void* window){
if(g_firstFrameAfterFileLoad)
{
g_firstFrameAfterFileLoad = false;
Serialization::Preferences::SetString("Document/FileID", doc.GetFileID());
doc.ParseLoadedFile();
FileHandler::SyncLocalFS();
}
Expand Down

0 comments on commit 5b844f7

Please sign in to comment.