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
This commit is contained in:
Ingo Weinhold
2009-12-28 00:02:54 +00:00
parent eb8dc1ebfb
commit 9704a425ea
+1 -1
View File
@@ -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, '/')) {