summaryrefslogtreecommitdiff
path: root/src/openfiles.cpp
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-03-01 17:14:45 +0300
committermonsta <[email protected]>2016-03-01 17:14:45 +0300
commit6316d1e7d9ecf742810c2cc90e518cc1e8bd7c9b (patch)
tree79e4ac971a234bbddfeb6dd524332bb72313747b /src/openfiles.cpp
parent254a91f8e544685e7de8b110f4981561e2a77a74 (diff)
downloadmate-system-monitor-6316d1e7d9ecf742810c2cc90e518cc1e8bd7c9b.tar.bz2
mate-system-monitor-6316d1e7d9ecf742810c2cc90e518cc1e8bd7c9b.tar.xz
fix segfault on view mode change with process properties open
from https://git.gnome.org/browse/gnome-system-monitor/commit/?id=76545e553c620d9b3437456bb4dbffa355c59816
Diffstat (limited to 'src/openfiles.cpp')
-rw-r--r--src/openfiles.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openfiles.cpp b/src/openfiles.cpp
index 76f2138..10f164c 100644
--- a/src/openfiles.cpp
+++ b/src/openfiles.cpp
@@ -174,7 +174,8 @@ update_openfiles_dialog (GtkWidget *tree)
GHashTable *new_maps;
guint i;
- info = static_cast<ProcInfo*>(g_object_get_data (G_OBJECT (tree), "selected_info"));
+ pid_t pid = GPOINTER_TO_UINT(static_cast<pid_t*>(g_object_get_data (G_OBJECT (tree), "selected_info")));
+ info = ProcInfo::find(pid);
if (!info)
return;
@@ -357,7 +358,7 @@ create_single_openfiles_dialog (GtkTreeModel *model, GtkTreePath *path,
tree = create_openfiles_tree (procdata);
gtk_container_add (GTK_CONTAINER (scrolled), tree);
- g_object_set_data (G_OBJECT (tree), "selected_info", info);
+ g_object_set_data (G_OBJECT (tree), "selected_info", GUINT_TO_POINTER (info->pid));
g_object_set_data (G_OBJECT (tree), "settings", procdata->settings);
gtk_box_pack_start (GTK_BOX (dialog_vbox), scrolled, TRUE, TRUE, 0);