From febe6df8190279f91569b31a7529e78985254869 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 2 Mar 2011 00:05:19 -0500 Subject: [PATCH] Fix a crash caused by an uninitialized variable (bug #219) after highlighting source fails --- CHANGES | 1 + Source/BSSourceView.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c4d3ab9..e5067d4 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ MacGDBp CHANGE LOG ##################### - Fix: Objects with nested objects wouldn't always load their child keys - Fix: #213 Crash when unchecking "Attached" when the debugger is inactive +- Fix: #219 Crash when highlighting source fails 1.4 Beta 2 diff --git a/Source/BSSourceView.mm b/Source/BSSourceView.mm index 1335c14..4042c5d 100644 --- a/Source/BSSourceView.mm +++ b/Source/BSSourceView.mm @@ -227,7 +227,7 @@ */ - (void)setPlainTextStringFromFile:(NSString*)filePath { - NSError* error; + NSError* error = nil; NSString* contents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error]; -- 2.43.5