aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/export_object.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-07-25 22:58:05 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-07-25 22:58:05 +0000
commit8db1e7a8b2af4d850804ec6a92e9668040a0b11e (patch)
tree82779d6ec348b01f746e636aea71ccfe26ce1006 /gtk/export_object.c
parentcb3022d09832902dd1d36c878ea21d72fd227086 (diff)
From David Aggeler:
Follow-up from SVN 25825 check in The g_slist_free() is really needed in export_object.c, otherwise, the export list has false (repetitive) entries in it, that cause a crash when selecting them. Whether false entries are in the list, only depends on the speed of the export processing, since this tap is Replaced all guchar with gchar. This should eliminate the warnings on solaris. I guess I used the wrong reference. Added patch for 'Authors' in case I need to add myself to the list. svn path=/trunk/; revision=25834
Diffstat (limited to 'gtk/export_object.c')
-rw-r--r--gtk/export_object.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/export_object.c b/gtk/export_object.c
index c20ac67171..3b1707c5d4 100644
--- a/gtk/export_object.c
+++ b/gtk/export_object.c
@@ -104,6 +104,7 @@ eo_win_destroy_cb(GtkWindow *win _U_, gpointer data)
remove_tap_listener(object_list);
unprotect_thread_critical_region();
+ /* Free the GSList attributes */
while(slist) {
entry = slist->data;
@@ -116,6 +117,7 @@ eo_win_destroy_cb(GtkWindow *win _U_, gpointer data)
g_free(entry);
}
+ /* Free the GSList elements */
g_slist_free(object_list->entries);
g_free(object_list);
}
@@ -240,6 +242,12 @@ eo_draw(void *tapdata)
GSList *slist = object_list->entries;
GtkTreeIter new_iter;
+ /* Free the tree first, since we may get called more than once for the same capture
+ Not doing so caused duplicate entries and clicking them caused crashes.
+ */
+
+ gtk_tree_store_clear(object_list->store);
+
while(slist) {
eo_entry = slist->data;