From fe2af7c415487aa7d481415b937c9fb42d14a57a 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.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e8acfa0..cfed7be 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,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.m b/Source/BSSourceView.m index 55481eb..2d800d6 100644 --- a/Source/BSSourceView.m +++ b/Source/BSSourceView.m @@ -227,7 +227,7 @@ */ - (void)setPlainTextStringFromFile:(NSString*)filePath { - NSError* error; + NSError* error = nil; NSString* contents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error]; -- 2.22.5