summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBOutputRedirect.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/HBOutputRedirect.m b/macosx/HBOutputRedirect.m
index 7239fe3cd..aa34b27d5 100644
--- a/macosx/HBOutputRedirect.m
+++ b/macosx/HBOutputRedirect.m
@@ -185,8 +185,11 @@ int stderrwrite(void *inFD, const char *buffer, int size)
- (void)forwardOutput:(NSData *)data
{
NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
- [listeners makeObjectsPerformSelector:forwardingSelector withObject:string];
- [string release];
+ if (string)
+ {
+ [listeners makeObjectsPerformSelector:forwardingSelector withObject:string];
+ [string release];
+ }
}
@end