From f883eb94e00d861927bcaed96fc1f2a63bbc865c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 14 May 2006 19:00:53 +0000 Subject: [PATCH] Bug noticed, by inspection. Filename can be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28292 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/DynamicLibrary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/System/DynamicLibrary.cpp b/lib/System/DynamicLibrary.cpp index 056fed0eb38..9bec68e5a95 100644 --- a/lib/System/DynamicLibrary.cpp +++ b/lib/System/DynamicLibrary.cpp @@ -107,7 +107,8 @@ void DynamicLibrary::LoadLibraryPermanently(const char* filename) { a_handle = lt_dlopenext(filename); if (a_handle == 0) - throw std::string("Can't open :") + filename + ": " + lt_dlerror(); + throw std::string("Can't open :") + + (filename ? filename : "") + ": " + lt_dlerror(); lt_dlmakeresident(a_handle);