From e19f5d68e5835eb93ae8e7b9e5de701a860987f8 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 11 Jan 2015 16:03:58 -0600 Subject: Revert "Package is retired, replaced by the GNOME Classic session in F19" This reverts commit 26ea386096c0cd7de55cc2226c46b63338c0ef39. --- fix-clock-crash.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 fix-clock-crash.patch (limited to 'fix-clock-crash.patch') diff --git a/fix-clock-crash.patch b/fix-clock-crash.patch new file mode 100644 index 0000000..4a12b60 --- /dev/null +++ b/fix-clock-crash.patch @@ -0,0 +1,52 @@ +From 58d7ba0359ab128f30b39ea0518a69ed83a4e329 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Tue, 8 Dec 2009 14:48:58 -0500 +Subject: [PATCH] Only call e_passwords_shutdown once + +It doesn't appear to support being called multiple times +in a row. + +It appears there was already an attempt to do this with a +reference counter called clock_numbers: + +/* Used to count the number of clock instances. It's there to know when + * we should free resources that are shared. */ +static int clock_numbers = 0; + +But the logic was wrong. +--- + applets/clock/clock.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/applets/clock/clock.c b/applets/clock/clock.c +index ddbbc16..c06530a 100644 +--- a/applets/clock/clock.c ++++ b/applets/clock/clock.c +@@ -803,8 +803,11 @@ destroy_clock (GtkWidget * widget, ClockData *cd) + + #ifdef HAVE_LIBECAL + if (clock_numbers > 0) { +- e_passwords_shutdown (); + clock_numbers--; ++ ++ if (clock_numbers == 0) { ++ e_passwords_shutdown (); ++ } + } + #endif + } +@@ -1385,8 +1388,10 @@ static void + create_clock_widget (ClockData *cd) + { + #ifdef HAVE_LIBECAL ++ if (clock_numbers == 0) { ++ e_passwords_init (); ++ } + clock_numbers++; +- e_passwords_init (); + #endif + + /* Main toggle button */ +-- +1.6.5.2 + -- cgit