summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorChow Loong Jin <hyperair@debian.org>2013-02-02 17:46:32 +0800
committerChow Loong Jin <hyperair@debian.org>2013-02-02 17:46:32 +0800
commit445d713ec296718a19b7890ceb65aea3c58f4034 (patch)
treea910925efd16d41bebdf045d6f5ed8d0f3b0aa21 /debian
parent217f8e4b08cf37c91dccd153bc8e0b4112b80c65 (diff)
Cherry-pick patch to fix crash when notification updates fail
Closes: #699503
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/05-fix-crash-when-notification-updates-fail.patch35
-rw-r--r--debian/patches/series1
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/05-fix-crash-when-notification-updates-fail.patch b/debian/patches/05-fix-crash-when-notification-updates-fail.patch
new file mode 100644
index 0000000..5630bc6
--- /dev/null
+++ b/debian/patches/05-fix-crash-when-notification-updates-fail.patch
@@ -0,0 +1,35 @@
+From 29552f7d62ad84c3e83fe26afbe125543f149d5f Mon Sep 17 00:00:00 2001
+From: Mirco Bauer <meebey@meebey.net>
+Date: Thu, 31 Jan 2013 06:32:11 +0100
+Subject: [PATCH] Fixed application crash in GTK+ callback when notification
+ updates fail
+
+For an example how this can crash an application see here:
+https://www.smuxi.org/issues/show/809
+---
+ src/Notification.cs | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+Index: notify-sharp/src/Notification.cs
+===================================================================
+--- notify-sharp.orig/src/Notification.cs 2013-02-02 17:43:47.023709602 +0800
++++ notify-sharp/src/Notification.cs 2013-02-02 17:45:21.273648920 +0800
+@@ -306,9 +306,15 @@
+ if (shown && !updates_pending) {
+ updates_pending = true;
+ GLib.Timeout.Add (100, delegate {
+- if (updates_pending) {
+- Show ();
+- updates_pending = false;
++ try {
++ if (updates_pending) {
++ Show ();
++ updates_pending = false;
++ }
++ } catch (Exception ex) {
++ // do not throw an exception in a GTK+ callback as
++ // this will _crash_ the application
++ Console.WriteLine("Ignoring exception: {0}", ex);
+ }
+ return false;
+ });
diff --git a/debian/patches/series b/debian/patches/series
index 1e38f89..0182781 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
02_reverse_cap_check.patch
03-use-dbus-sharp.patch
04-fix-app-name-derivation.patch
+05-fix-crash-when-notification-updates-fail.patch