From 9704a425ea92a2662b1c26eca9819c18b5044c0a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 28 Dec 2009 00:02:54 +0000 Subject: [PATCH] When pre-loading stuff, we must not access gProgramImage unchecked. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34785 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/runtime_loader/elf_load_image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp index 5a340bcd8a..0a2ae72538 100644 --- a/src/system/runtime_loader/elf_load_image.cpp +++ b/src/system/runtime_loader/elf_load_image.cpp @@ -373,7 +373,7 @@ load_image(char const* name, image_type type, const char* rpath, if (type != B_ADD_ON_IMAGE) { found = find_loaded_image_by_name(name, APP_OR_LIBRARY_TYPE); - if (found == NULL && type != B_APP_IMAGE) { + if (found == NULL && type != B_APP_IMAGE && gProgramImage != NULL) { // Special case for add-ons that link against the application // executable, with the executable not having a soname set. if (const char* lastSlash = strrchr(name, '/')) {