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

This commit is contained in:
Alexey Pelykh 2013-01-31 22:08:26 +02:00
parent 8e879f80a7
commit ba0ec3759d

View File

@ -3010,7 +3010,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);
const char* bootstrapPropertyEnd = bootstrapPropertyDup + (bootstrapPropertyDup ? strlen(bootstrapPropertyDup) : 0);
char* codeLibraryName = (char*)bootstrapPropertyDup;
char* codeLibraryNameEnd = 0;
if (codeLibraryName && (codeLibraryNameEnd = strchr(codeLibraryName, system->pathSeparator())))