diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-11-04 17:06:24 +0300 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-11-04 17:07:13 +0300 |
commit | fb281d6adf69d76eefe4110cc8d0691836a76de4 (patch) | |
tree | e73ebaa3e101b95841388df5eb958dc180338321 /plugins/x2go | |
parent | e91b5e2de3b4ef7e0a1f3492b8895346db06d572 (diff) |
x2go_plugin.c: Rename user_data -> custom_data; Fix dereferencing 'custom-data->user_data'
Diffstat (limited to 'plugins/x2go')
-rw-r--r-- | plugins/x2go/x2go_plugin.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c index 2d48d2d35..f0f31f653 100644 --- a/plugins/x2go/x2go_plugin.c +++ b/plugins/x2go/x2go_plugin.c @@ -381,16 +381,16 @@ static GtkWidget* rmplugin_x2go_find_child(GtkWidget* parent, const gchar* name) static gboolean rmplugin_x2go_session_chooser_row_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, - X2GoCustomUserData *user_data) + X2GoCustomUserData *custom_data) { REMMINA_PLUGIN_DEBUG("Function entry."); // Safety first. - g_assert(user_data); - g_assert(user_data->gp); - g_assert(user_data->user_data); + g_assert(custom_data); + g_assert(custom_data->gp); + g_assert(custom_data->user_data); - GtkWidget* dialog = GTK_WIDGET(user_data); + GtkWidget* dialog = GTK_WIDGET(custom_data->user_data); gchar *session_id; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(treeview); @@ -402,12 +402,13 @@ static gboolean rmplugin_x2go_session_chooser_row_activated(GtkTreeView *treevie // Silent bail out. if (!session_id || strlen(session_id) <= 0) return G_SOURCE_REMOVE; - SET_RESUME_SESSION(user_data->gp, session_id); + SET_RESUME_SESSION(custom_data->gp, session_id); // Unstucking main process. Telling it that a session has been selected. // We use a trick here. As long as there is something other than 0 // stored, a session is selected. So we use the gpointer as a gboolean. - SET_SESSION_SELECTED(user_data->gp, (gpointer) TRUE); + SET_SESSION_SELECTED(custom_data->gp, (gpointer) TRUE); + gtk_widget_hide(GTK_WIDGET(dialog)); gtk_widget_destroy(GTK_WIDGET(dialog)); } |