Skip to content

Commit

Permalink
Small step: now Main_LoadResources won't deselect if it fails loading…
Browse files Browse the repository at this point in the history
… config and game name data
  • Loading branch information
ioan-chera committed Oct 17, 2023
1 parent a30c7a3 commit 4e26be5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,6 @@ void Instance::Main_LoadResources(const LoadingData &loading)
LoadingData newLoading = loading;
try
{
// FIXME: avoid doing this in case of error
if(edit.Selected)
edit.Selected->clear_all();

gLog.printf("\n");
gLog.printf("----- Loading Resources -----\n");

Expand Down Expand Up @@ -934,6 +930,11 @@ void Instance::Main_LoadResources(const LoadingData &loading)
}

// Commit it

// Must deselect now
if(edit.Selected)
edit.Selected->clear_all();

conf = config;
loaded = newLoading;

Expand Down

0 comments on commit 4e26be5

Please sign in to comment.