diff -Nru docky-2.1.2/debian/changelog docky-2.1.2/debian/changelog --- docky-2.1.2/debian/changelog 2011-04-09 12:02:56.000000000 +0200 +++ docky-2.1.2/debian/changelog 2011-04-13 09:24:25.000000000 +0200 @@ -1,3 +1,11 @@ +docky (2.1.2-1ubuntu1) natty; urgency=low + + * debian/patches: + + 10_prevent crash_if_a_desktop-file_contains_invalid_values.patch + (LP: #757140) + + -- Rico Tzschichholz Wed, 13 Apr 2011 09:23:01 +0200 + docky (2.1.2-1) experimental; urgency=low * New upstream release 2.1.2 "Docks love Mono", diff -Nru docky-2.1.2/debian/control docky-2.1.2/debian/control --- docky-2.1.2/debian/control 2011-04-09 12:00:02.000000000 +0200 +++ docky-2.1.2/debian/control 2011-04-13 09:26:42.000000000 +0200 @@ -1,7 +1,8 @@ Source: docky Section: x11 Priority: optional -Maintainer: Debian CLI Applications Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian CLI Applications Team Uploaders: Christopher James Halse Rogers , Rico Tzschichholz Build-Depends: debhelper (>= 7.0.50~), autotools-dev, diff -Nru docky-2.1.2/debian/patches/10_prevent_crash_if_a_desktop-file_contains_invalid_values.patch docky-2.1.2/debian/patches/10_prevent_crash_if_a_desktop-file_contains_invalid_values.patch --- docky-2.1.2/debian/patches/10_prevent_crash_if_a_desktop-file_contains_invalid_values.patch 1970-01-01 01:00:00.000000000 +0100 +++ docky-2.1.2/debian/patches/10_prevent_crash_if_a_desktop-file_contains_invalid_values.patch 2011-04-13 09:26:05.000000000 +0200 @@ -0,0 +1,45 @@ +Description: Prevent crash if a desktop-file contains invalid values +Author: Rico Tzschichholz +Bug-Report: https://bugs.launchpad.net/bugs/757140 +Forwarded: not-needed +Last-Update: 2011-04-13 + +Index: docky-2.1.2/Docky.Services/Docky.Services/Applications/DesktopItem.cs +=================================================================== +--- docky-2.1.2.orig/Docky.Services/Docky.Services/Applications/DesktopItem.cs ++++ docky-2.1.2/Docky.Services/Docky.Services/Applications/DesktopItem.cs +@@ -177,22 +177,24 @@ + + public bool GetBool (string key) + { +- string result = GetString (key); ++ string result = GetStrings (key).First (); ++ ++ bool val; ++ if (bool.TryParse (result, out val)) ++ return val; + +- if (string.Equals (result, "false", StringComparison.CurrentCultureIgnoreCase)) { +- return false; +- } else if (string.Equals (result, "true", StringComparison.CurrentCultureIgnoreCase)) { +- return true; +- } else { +- throw new ArgumentException (); +- } ++ return false; + } + + public double GetDouble (string key) + { +- string result = GetString (key); ++ string result = GetStrings (key).First (); ++ ++ double val; ++ if (double.TryParse (result, out val)) ++ return val; + +- return Convert.ToDouble (result); ++ return 0; + } + + public void Launch (IEnumerable uris) diff -Nru docky-2.1.2/debian/patches/series docky-2.1.2/debian/patches/series --- docky-2.1.2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ docky-2.1.2/debian/patches/series 2011-04-13 09:25:10.000000000 +0200 @@ -0,0 +1 @@ +10_prevent_crash_if_a_desktop-file_contains_invalid_values.patch