aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-04-16 01:30:10 +0000
committerChristian Grothoff <christian@grothoff.org>2007-04-16 01:30:10 +0000
commit04bd1e859928c86e41f74d9fd62915f79da3e458 (patch)
tree0ca8127027a3116aeba7fb80fe0ea45e9b17c687
parent8c8c8c5717b8e992bb79dd77493239cf2bd377f5 (diff)
downloadgnunet-gtk-04bd1e859928c86e41f74d9fd62915f79da3e458.tar.gz
gnunet-gtk-04bd1e859928c86e41f74d9fd62915f79da3e458.zip
fixing Mantis 1194 and potential crash
-rw-r--r--src/plugins/fs/fs.h2
-rw-r--r--src/plugins/fs/upload.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h
index acd24776..0cba8086 100644
--- a/src/plugins/fs/fs.h
+++ b/src/plugins/fs/fs.h
@@ -294,6 +294,8 @@ typedef struct UL {
294 294
295 int has_terminated; 295 int has_terminated;
296 296
297 int is_top;
298
297} UploadList; 299} UploadList;
298 300
299extern struct FSUI_Context * ctx; 301extern struct FSUI_Context * ctx;
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c
index 971c1bb9..5749ae7c 100644
--- a/src/plugins/fs/upload.c
+++ b/src/plugins/fs/upload.c
@@ -150,6 +150,7 @@ fs_upload_started(struct FSUI_UploadList * fsui,
150 ret->filename = STRDUP(filename); 150 ret->filename = STRDUP(filename);
151 ret->fsui_list = fsui; 151 ret->fsui_list = fsui;
152 ret->total = total; 152 ret->total = total;
153 ret->is_top = parent == NULL;
153 if ( (parent != NULL) && 154 if ( (parent != NULL) &&
154 (NULL != (path = gtk_tree_row_reference_get_path(parent->summaryViewRowReference))) ) { 155 (NULL != (path = gtk_tree_row_reference_get_path(parent->summaryViewRowReference))) ) {
155 gtk_tree_model_get_iter(GTK_TREE_MODEL(upload_summary), 156 gtk_tree_model_get_iter(GTK_TREE_MODEL(upload_summary),
@@ -558,7 +559,8 @@ clearCompletedUploadCallback(GtkTreeModel * model,
558 iter, 559 iter,
559 UPLOAD_INTERNAL, &ul, 560 UPLOAD_INTERNAL, &ul,
560 -1); 561 -1);
561 if (ul->has_terminated) { 562 if ( (ul->has_terminated) &&
563 (ul->is_top) ) {
562 fcbc.method = &FSUI_stopUpload; 564 fcbc.method = &FSUI_stopUpload;
563 fcbc.argument = ul->fsui_list; 565 fcbc.argument = ul->fsui_list;
564 run_with_save_calls(&fsui_callback, 566 run_with_save_calls(&fsui_callback,