From cf0ae53495cbb76b68a9010f646ea5748d742531 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia Date: Wed, 11 May 2016 16:50:30 -0400 Subject: [PATCH] Fix for http://crashes.to/s/f43ce0accd0 --- .../Custom Table Cell Views/CLTimezoneCellView.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m index 106f415..04ac021 100644 --- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m +++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m @@ -54,6 +54,20 @@ if ([[sender superview] isKindOfClass:[self class]]) { CLTimezoneCellView *cellView = (CLTimezoneCellView *)[sender superview]; + + /* + + Fix for http://crashes.to/s/f43ce0accd0 + + More stringent null check for array values. + + */ + + if (panelController.defaultPreferences == nil && floatingWindow.defaultPreferences == nil) + { + return; + } + NSData *dataObject = displayMode.integerValue == 0 ? panelController.defaultPreferences[cellView.rowNumber] : floatingWindow.defaultPreferences[cellView.rowNumber]; CLTimezoneData *timezoneObject = [CLTimezoneData getCustomObject:dataObject];