From 529017442643c4a308b16ddaebbfa5fb0f5e1e40 Mon Sep 17 00:00:00 2001 From: John Cook Date: Sat, 23 Jan 2016 18:31:17 +1100 Subject: [PATCH] Fix an unspecified crash when the file reference is not available. -[BSSourceView errorHighlightingFile:] can be called when |file_| is nil. --- Source/BSSourceView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/BSSourceView.mm b/Source/BSSourceView.mm index 4042c5d..8669d9e 100644 --- a/Source/BSSourceView.mm +++ b/Source/BSSourceView.mm @@ -140,7 +140,7 @@ - (void)errorHighlightingFile:(NSNotification*)notif { NSData* data = [[notif userInfo] objectForKey:NSFileHandleNotificationDataItem]; - if ([data length] > 0) // there's something on stderr, so the PHP CLI failed + if ([data length] > 0 && file_) // there's something on stderr, so the PHP CLI failed [self setPlainTextStringFromFile:file_]; } -- 2.43.5