From 5deea9eb8422ecab93b4fa75e06bef774317ba25 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Fri, 9 Jan 2015 12:46:01 -0500 Subject: [PATCH] fix segpath when realpath returns NULL. --- toolbox/os_highlevel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolbox/os_highlevel.cpp b/toolbox/os_highlevel.cpp index 794435d..f31ae46 100644 --- a/toolbox/os_highlevel.cpp +++ b/toolbox/os_highlevel.cpp @@ -87,7 +87,8 @@ namespace OS { // expand the path. Also handles relative paths. char *cp = ::fs_spec_realpath(path.c_str(), buffer); - + if (!cp) return ""; + return std::string(cp); }