From 767a82014a8961fe7d673ffd45a9dd1657bc861d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 28 Nov 2024 15:22:11 +0100 Subject: [PATCH] Early-out checking for pinned folders --- UI/MainScreen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 41598ab5bd..4c463b657a 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -978,6 +978,10 @@ std::vector GameBrowser::GetPinnedPaths() const { #else static const std::string sepChars = "/\\"; #endif + if (g_Config.vPinnedPaths.empty()) { + // Early-out. + return std::vector(); + } const std::string currentPath = File::ResolvePath(path_.GetPath().ToString()); const std::vector paths = g_Config.vPinnedPaths;