From 54dc30a41a6335749f0741f21ff9b9003ab0dc5e Mon Sep 17 00:00:00 2001 From: "Xinlei(Ryan) Pan" Date: Wed, 29 Jan 2020 15:47:37 -0500 Subject: [PATCH] update based on Scott's comments --- .../HorizontalCombinationViews/PrimaryButtonView.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Molecules/HorizontalCombinationViews/PrimaryButtonView.m b/MVMCoreUI/Molecules/HorizontalCombinationViews/PrimaryButtonView.m index 07fd0ff4..1bcc6a9e 100644 --- a/MVMCoreUI/Molecules/HorizontalCombinationViews/PrimaryButtonView.m +++ b/MVMCoreUI/Molecules/HorizontalCombinationViews/PrimaryButtonView.m @@ -353,7 +353,7 @@ // update with delegateObject - (nonnull instancetype)initButtonSmall:(BOOL)small buttonMap:(nullable NSDictionary *)buttonMap delegateObject:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData { - NSObject *buttonDelegate; + NSObject *buttonDelegate = nil; NSObject *actionDelegate = delegateObject.actionDelegate; if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) { buttonDelegate = ((MVMCoreUIDelegateObject *)delegateObject).buttonDelegate; @@ -362,7 +362,7 @@ } - (nonnull instancetype)initWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap delegateObject:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData { - NSObject *buttonDelegate; + NSObject *buttonDelegate = nil; NSObject *actionDelegate = delegateObject.actionDelegate; if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) { buttonDelegate = ((MVMCoreUIDelegateObject *)delegateObject).buttonDelegate; @@ -371,7 +371,7 @@ } - (void)setupWithButtonMap:(nullable NSDictionary *)buttonMap delegate:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData { - NSObject *buttonDelegate; + NSObject *buttonDelegate = nil; NSObject *actionDelegate = delegateObject.actionDelegate; if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) { buttonDelegate = ((MVMCoreUIDelegateObject *)delegateObject).buttonDelegate; @@ -381,7 +381,7 @@ - (void)setupWithPrimaryButtonMap:(nullable NSDictionary *)primaryButtonMap secondaryButtonMap:(nullable NSDictionary *)secondaryButtonMap delegateObject:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData { - NSObject *buttonDelegate; + NSObject *buttonDelegate = nil; NSObject *actionDelegate = delegateObject.actionDelegate; if ([delegateObject isKindOfClass:[MVMCoreUIDelegateObject class]]) { buttonDelegate = ((MVMCoreUIDelegateObject *)delegateObject).buttonDelegate;