Core: Correct a use after free.

This commit is contained in:
Unknown W. Brackets 2022-12-10 21:12:58 -08:00
parent 1810692236
commit c9f3878e9d

View File

@ -392,8 +392,8 @@ bool UmdReplace(const Path &filepath, std::string &error) {
FileLoader *loadedFile = ConstructFileLoader(filepath);
if (!loadedFile->Exists()) {
delete loadedFile;
error = loadedFile->GetPath().ToVisualString() + " doesn't exist";
delete loadedFile;
return false;
}
UpdateLoadedFile(loadedFile);