[gnome-shell] Fix crash in app monitor on 64 bits CPUs
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-shell] Fix crash in app monitor on 64 bits CPUs
- Date: Fri, 5 Jun 2009 09:52:59 -0400 (EDT)
commit ef3ac7a7f6a828e5fcdd1a635773ef79613c54f9
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Mon Jun 1 21:43:45 2009 +0200
Fix crash in app monitor on 64 bits CPUs
Pointers and integers are not the same size, use GPOINTER_TO_INT() for conversion.
http://bugzilla.gnome.org/show_bug.cgi?id=584539
---
src/shell-app-monitor.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/shell-app-monitor.c b/src/shell-app-monitor.c
index 048e2ea..95c7a26 100644
--- a/src/shell-app-monitor.c
+++ b/src/shell-app-monitor.c
@@ -693,6 +693,8 @@ static void
save_to_file (ShellAppMonitor *monitor)
{
GHashTableIter iter;
+ gpointer key;
+ gpointer value;
int activity;
GSList *popularity;
AppPopularity *app_popularity;
@@ -721,9 +723,11 @@ save_to_file (ShellAppMonitor *monitor)
g_object_unref (output);
g_hash_table_iter_init (&iter, monitor->popularities);
- while (g_hash_table_iter_next (&iter, (gpointer *) &activity, (gpointer *) &popularity)
- && popularity)
+ while (g_hash_table_iter_next (&iter, &key, &value) && value)
{
+ activity = GPOINTER_TO_INT (key);
+ popularity = value;
+
line = g_strdup_printf ("%i\n", activity);
g_data_output_stream_put_string (data_output, "--\n", NULL, NULL);
g_data_output_stream_put_string (data_output, line, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]