From 5c10615c9f0e982486cf4c08fba514d1a9dd3e0f Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Fri, 6 May 2011 12:40:09 -0700 Subject: [PATCH] Fix for could not load theme errors in nib2cib. CFBundle was using Image to determine if the platform in question supported image spriting. On Rhino, the Image object doesn't exist, throwing an exception and causing everything to break from that point forward. Reviewed by me. --- Objective-J/CFBundle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objective-J/CFBundle.js b/Objective-J/CFBundle.js index ff4468627..dcb166aab 100644 --- a/Objective-J/CFBundle.js +++ b/Objective-J/CFBundle.js @@ -519,7 +519,8 @@ function CFBundleNotifySpriteSupportListeners() function CFBundleTestSpriteTypes(/*Array*/ spriteTypes) { - if (spriteTypes.length < 2) + // If we don't support Images, then clearly we don't support sprites. + if (!("Image" in global) || spriteTypes.length < 2) { CFBundleSupportedSpriteType = CFBundleNoSpriteType; CFBundleNotifySpriteSupportListeners();