Add sanity check

This commit is contained in:
Giom Foret
2017-06-20 17:13:55 +02:00
parent 660c7d7a90
commit 3ecc15d5ef
+11 -2
View File
@@ -3688,8 +3688,11 @@
style:MXKAlertActionStyleCancel
handler:^(MXKAlert *alert) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf->currentAlert = nil;
if (weakSelf)
{
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf->currentAlert = nil;
}
}];
@@ -3697,6 +3700,12 @@
style:MXKAlertActionStyleDefault
handler:^(MXKAlert *alert) {
// Sanity check
if (!weakSelf)
{
return;
}
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf->currentAlert = nil;