From 09f4d16aa1356b52e81047bb5177acef1f2d1be6 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 5 Apr 2012 13:59:30 -0700 Subject: [PATCH] Don't let last version name be null --- astrid/src/com/todoroo/astrid/utility/AstridPreferences.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java index c873192e1..ff3315f9e 100644 --- a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java +++ b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java @@ -81,7 +81,10 @@ public class AstridPreferences { /** The name (e.g. 4.0.1) of the currently installed version of astrid*/ public static String getCurrentVersionName() { - return Preferences.getStringValue(P_CURRENT_VERSION_NAME); + String versionName = Preferences.getStringValue(P_CURRENT_VERSION_NAME); + if (versionName == null) + versionName = "0"; //$NON-NLS-1$ + return versionName; } public static void setCurrentVersionName(String versionName) {