[vlc-commits] iOS dialog provider: prevent runtime exception on tvOS

Felix Paul Kühne git at videolan.org
Wed Jan 6 21:16:30 CET 2016


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jan  6 21:15:42 2016 +0100| [f3aa6fb0146e21436495570e1c0a3d71e09b0cb3] | committer: Felix Paul Kühne

iOS dialog provider: prevent runtime exception on tvOS

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3aa6fb0146e21436495570e1c0a3d71e09b0cb3
---

 modules/gui/ios_dialog_provider/dialogProvider.m |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/ios_dialog_provider/dialogProvider.m b/modules/gui/ios_dialog_provider/dialogProvider.m
index f2e81a2..98d426d 100644
--- a/modules/gui/ios_dialog_provider/dialogProvider.m
+++ b/modules/gui/ios_dialog_provider/dialogProvider.m
@@ -387,7 +387,8 @@ bool checkProgressPanel (void *priv)
                                                                                  message:dialog[@"message"]
                                                                           preferredStyle:UIAlertControllerStyleAlert];
 
-        [alertController addAction:[UIAlertAction actionWithTitle:dialog[@"cancel"]
+        NSString *cancelTitle = dialog[@"cancel"];
+        [alertController addAction:[UIAlertAction actionWithTitle:cancelTitle != nil ? cancelTitle : NSLocalizedString(@"Cancel", nil)
                                                             style:UIAlertActionStyleDestructive
                                                           handler:^(UIAlertAction * _Nonnull action) {
                                                               ret = 3;



More information about the vlc-commits mailing list