Fixed a missed code path for a previous crash fix.

This commit is contained in:
Leon Styhre 2021-12-02 18:35:02 +01:00
parent ae0605b785
commit c75ce3c8b0

View file

@ -100,12 +100,10 @@ GuiGameScraper::GuiGameScraper(Window* window,
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "CANCEL", "cancel", [&] { buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "CANCEL", "cancel", [&] {
if (mSearch->getSavedNewMedia()) { if (mSearch->getSavedNewMedia()) {
// If the user aborted the scraping but there was still some media downloaded, // If the user aborted the scraping but there was still some media downloaded,
// then force an unload of the textures for the game image and marquee, and make // then flag to GuiMetaDataEd that the image and marquee textures need to be
// an update of the game entry. Otherwise the images would not get updated until // manually unloaded and that the gamelist needs to be reloaded. Otherwise the
// the user scrolls up and down the gamelist. // images would not get updated until the user scrolls up and down the gamelist.
TextureResource::manualUnload(mSearchParams.game->getImagePath(), false); mSavedMediaAndAborted = true;
TextureResource::manualUnload(mSearchParams.game->getMarqueePath(), false);
ViewController::get()->onFileChanged(mSearchParams.game, true);
} }
delete this; delete this;
})); }));