From f0026b77a567f4501ae2afeb03260fd23fda9cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schro=CC=88pf?= Date: Wed, 12 Nov 2014 11:51:31 +0100 Subject: [PATCH] Fixes exception when initializing preferences --- LogCat/LogCatPreferences.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LogCat/LogCatPreferences.m b/LogCat/LogCatPreferences.m index 1737679..7ef4c14 100644 --- a/LogCat/LogCatPreferences.m +++ b/LogCat/LogCatPreferences.m @@ -14,7 +14,8 @@ @implementation LogCatPreferences - (void)awakeFromNib { - self.tfAdbPath.stringValue = [[NSUserDefaults standardUserDefaults] objectForKey:PREFS_ADB_PATH]; + NSString *adbPath = [[NSUserDefaults standardUserDefaults] objectForKey:PREFS_ADB_PATH]; + self.tfAdbPath.stringValue = (adbPath == nil) ? @"" : adbPath; } - (void)setupToolbar