From b9371a6961486875f698d4dc5bafa7e9e32d4ef8 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 10 Nov 2012 06:52:37 +0000 Subject: [PATCH] Don't assume that Modules have directories. They may be in-memory-only things like our favorite "cl_kernels" and so module_directory here can be NULL. llvm-svn: 167666 --- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 6478b2c..4391e68 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -86,7 +86,7 @@ PlatformDarwin::LocateExecutableScriptingResource (const ModuleSpec &module_spec { path_string.Clear(); path_string.Printf("%s.framework",module_basename); - if (strstr(module_directory, path_string.GetData())) + if (module_directory && strstr(module_directory, path_string.GetData())) { // we are going to be in foo.framework/Versions/X/foo path_string.Clear(); -- 2.7.4