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;