From e3380957ba278ceefa9ee083b7f7682c72fdf470 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 23 Mar 2021 18:02:56 -0700 Subject: [PATCH] Fixes crash on empty path config string If the config exists as an empty string then this would crash --- External/FEXCore/Source/Interface/Config/Config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/External/FEXCore/Source/Interface/Config/Config.cpp b/External/FEXCore/Source/Interface/Config/Config.cpp index e972bf7f4..34ac407f7 100644 --- a/External/FEXCore/Source/Interface/Config/Config.cpp +++ b/External/FEXCore/Source/Interface/Config/Config.cpp @@ -90,6 +90,10 @@ namespace FEXCore::Config { } std::string ExpandPath(std::string PathName) { + if (PathName.empty()) { + return {}; + } + std::filesystem::path Path{PathName}; // Expand home if it exists