From 4d2e0c7b480eea2ec78377004ec6911c83abbfff Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 28 May 2019 17:40:24 -0400 Subject: [PATCH] UICommon/ResourcePack/Manager: Resolve use-after-move in Add() The pack is already has its validity checked at the beginning of the function, so we don't need to check this again after inserting it. Also resolves a use-after-move case. --- Source/Core/UICommon/ResourcePack/Manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/UICommon/ResourcePack/Manager.cpp b/Source/Core/UICommon/ResourcePack/Manager.cpp index 4977f09523..0d2327e56e 100644 --- a/Source/Core/UICommon/ResourcePack/Manager.cpp +++ b/Source/Core/UICommon/ResourcePack/Manager.cpp @@ -128,7 +128,7 @@ bool Add(const std::string& path, int offset) packs.insert(packs.begin() + offset, std::move(pack)); - return pack.IsValid(); + return true; } bool Remove(ResourcePack& pack)