cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesj...@apache.org
Subject ios commit: [CB-2846] SplashScreen crashes app when image not available
Date Tue, 30 Apr 2013 15:04:03 GMT
Updated Branches:
  refs/heads/master b3a255466 -> bbf78ac83


[CB-2846] SplashScreen crashes app when image not available

- only updates bounds when image is available
- added warning log when image is not available


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bbf78ac8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bbf78ac8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bbf78ac8

Branch: refs/heads/master
Commit: bbf78ac83fd920c59e5a393942933e7e2eabb6de
Parents: b3a2554
Author: James Jong <wjamesjong@gmail.com>
Authored: Tue Apr 30 10:28:39 2013 -0400
Committer: James Jong <wjamesjong@gmail.com>
Committed: Tue Apr 30 11:02:49 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVSplashScreen.m |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bbf78ac8/CordovaLib/Classes/CDVSplashScreen.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.m b/CordovaLib/Classes/CDVSplashScreen.m
index 45889a0..fdb79fa 100644
--- a/CordovaLib/Classes/CDVSplashScreen.m
+++ b/CordovaLib/Classes/CDVSplashScreen.m
@@ -152,7 +152,12 @@
         _curImageName = imageName;
     }
 
-    [self updateBounds];
+    // Check that splash screen's image exists before updating bounds
+    if (_imageView.image) {
+        [self updateBounds];
+    } else {
+        NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName);
+    }
 }
 
 - (void)updateBounds


Mime
View raw message