Fix crash if no avian.boostrap is specified (oops)

This commit is contained in:
Alexey Pelykh 2013-01-31 22:07:56 +02:00
parent 2e3856211b
commit 8e879f80a7

View File

@ -3011,7 +3011,7 @@ Machine::Machine(System* system, Heap* heap, Finder* bootFinder,
const char* bootstrapProperty = findProperty(this, BOOTSTRAP_PROPERTY);
const char* bootstrapPropertyDup = bootstrapProperty ? strdup(bootstrapProperty) : 0;
const char* bootstrapPropertyEnd = bootstrapProperty + (bootstrapProperty ? strlen(bootstrapProperty) : 0);
char* codeLibraryName = (char*)bootstrapProperty;
char* codeLibraryName = (char*)bootstrapPropertyDup;
char* codeLibraryNameEnd = 0;
if (codeLibraryName && (codeLibraryNameEnd = strchr(codeLibraryName, system->pathSeparator())))
*codeLibraryNameEnd = 0;