[Android] src: Add default values to getProperty() to prevent NullPointerException

Edward Wang git at videolan.org
Mon Jul 23 13:13:15 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Jul 23 07:09:29 2012 -0400| [302b3d4c4031e4e8452ecc5a11ae3407e6d2899d] | committer: Edward Wang

src: Add default values to getProperty() to prevent NullPointerException

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=302b3d4c4031e4e8452ecc5a11ae3407e6d2899d
---

 vlc-android/src/org/videolan/vlc/Util.java |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index ba0f315..55627c7 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -216,9 +216,9 @@ public class Util {
         }
 
         String ANDROID_ABI = properties.getProperty("ANDROID_ABI");
-        boolean NO_NEON = properties.getProperty("NO_NEON").equals("1");
-        boolean NO_FPU = properties.getProperty("NO_FPU").equals("1");
-        boolean NO_ARMV6 = properties.getProperty("NO_ARMV6").equals("1");
+        boolean NO_NEON = properties.getProperty("NO_NEON","0").equals("1");
+        boolean NO_FPU = properties.getProperty("NO_FPU","0").equals("1");
+        boolean NO_ARMV6 = properties.getProperty("NO_ARMV6","0").equals("1");
         boolean hasNeon = false, hasFpu = false, hasArmV6 = false, hasArmV7 = false;
 
         try {



More information about the Android mailing list