aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-31 12:03:05 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-31 12:03:05 +0000
commit9ea7d08b66349bc4f666f9d301b995dffbb8cf4c (patch)
tree087e935150bed9347c7f887519f016d1824712ac
parent77abd7e4be632270c09fda9ffeae809d01ced4e1 (diff)
downloadgnunet-gtk-9ea7d08b66349bc4f666f9d301b995dffbb8cf4c.tar.gz
gnunet-gtk-9ea7d08b66349bc4f666f9d301b995dffbb8cf4c.zip
-fix NPE
-rw-r--r--src/fs/gnunet-fs-gtk-main_window_file_publish.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fs/gnunet-fs-gtk-main_window_file_publish.c b/src/fs/gnunet-fs-gtk-main_window_file_publish.c
index 7706da30..dc20aa93 100644
--- a/src/fs/gnunet-fs-gtk-main_window_file_publish.c
+++ b/src/fs/gnunet-fs-gtk-main_window_file_publish.c
@@ -819,8 +819,11 @@ add_item (struct AddDirClientContext *adcc, GtkTreeStore *ts,
819 819
820 if (item->is_directory) 820 if (item->is_directory)
821 { 821 {
822 GNUNET_CONTAINER_meta_data_delete (item->meta, 822 if (NULL != item->meta)
823 EXTRACTOR_METATYPE_MIMETYPE, NULL, 0); 823 GNUNET_CONTAINER_meta_data_delete (item->meta,
824 EXTRACTOR_METATYPE_MIMETYPE, NULL, 0);
825 else
826 item->meta = GNUNET_CONTAINER_meta_data_create ();
824 GNUNET_FS_meta_data_make_directory (item->meta); 827 GNUNET_FS_meta_data_make_directory (item->meta);
825 if (NULL == item->ksk_uri) 828 if (NULL == item->ksk_uri)
826 item->ksk_uri = GNUNET_FS_uri_ksk_create (GNUNET_FS_DIRECTORY_MIME, NULL); 829 item->ksk_uri = GNUNET_FS_uri_ksk_create (GNUNET_FS_DIRECTORY_MIME, NULL);