diff --git a/ChangeLog b/ChangeLog index 423ea7a..963f50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-03-23 Wolfgang Lux + + * Tools/STEnvironmentProcess.m (initWithDescriptionName:): + Check the result of the super class initializer and assign it to + self. + 2013-03-23 Wolfgang Lux * Frameworks/StepTalk/STActor.m (-init, -initWithEnvironment:, diff --git a/Tools/STEnvironmentProcess.m b/Tools/STEnvironmentProcess.m index 4bb7879..3bbfb77 100644 --- a/Tools/STEnvironmentProcess.m +++ b/Tools/STEnvironmentProcess.m @@ -7,25 +7,25 @@ @implementation STEnvironmentProcess - initWithDescriptionName:(NSString *)descName { - STEnvironmentDescription *desc; - - self = [super init]; - - if(descName) + if ((self = [super init]) != nil) { - NSLog(@"Creating environment from description '%@'", descName); - desc = [STEnvironmentDescription descriptionWithName:descName]; - environment = [[STEnvironment alloc] initWithDescription:desc]; - } - else - { - environment = [[STEnvironment alloc] initWithDefaultDescription]; - } - - /* FIXME: use some configurable mechanism */ - [environment setObject:environment forName:@"Environment"]; - [environment loadModule:@"SimpleTranscript"]; + STEnvironmentDescription *desc; + if (descName) + { + NSLog(@"Creating environment from description '%@'", descName); + desc = [STEnvironmentDescription descriptionWithName:descName]; + environment = [[STEnvironment alloc] initWithDescription:desc]; + } + else + { + environment = [[STEnvironment alloc] initWithDefaultDescription]; + } + + /* FIXME: use some configurable mechanism */ + [environment setObject:environment forName:@"Environment"]; + [environment loadModule:@"SimpleTranscript"]; + } return self; } - (void)dealloc