diff options
Diffstat (limited to 'src/fs_event_handler.c')
-rw-r--r-- | src/fs_event_handler.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fs_event_handler.c b/src/fs_event_handler.c index f37d575e..d1c88d6b 100644 --- a/src/fs_event_handler.c +++ b/src/fs_event_handler.c | |||
@@ -770,7 +770,8 @@ add_search_result (struct SearchTab *tab, | |||
770 | char *uris; | 770 | char *uris; |
771 | GdkPixbuf *pixbuf; | 771 | GdkPixbuf *pixbuf; |
772 | 772 | ||
773 | if ( (!GNUNET_FS_uri_test_loc (uri)) && | 773 | if ( (uri != NULL) && |
774 | (!GNUNET_FS_uri_test_loc (uri)) && | ||
774 | (!GNUNET_FS_uri_test_chk (uri)) ) | 775 | (!GNUNET_FS_uri_test_chk (uri)) ) |
775 | { | 776 | { |
776 | /* SKS support not implemented yet */ | 777 | /* SKS support not implemented yet */ |
@@ -791,7 +792,10 @@ add_search_result (struct SearchTab *tab, | |||
791 | -1); | 792 | -1); |
792 | if (desc == NULL) | 793 | if (desc == NULL) |
793 | desc = GNUNET_strdup (_("no description supplied")); | 794 | desc = GNUNET_strdup (_("no description supplied")); |
794 | uris = GNUNET_FS_uri_to_string (uri); | 795 | if (uri == NULL) |
796 | uris = GNUNET_strdup (_("no URI")); | ||
797 | else | ||
798 | uris = GNUNET_FS_uri_to_string (uri); | ||
795 | mime = GNUNET_CONTAINER_meta_data_get_first_by_types (meta, | 799 | mime = GNUNET_CONTAINER_meta_data_get_first_by_types (meta, |
796 | EXTRACTOR_METATYPE_MIMETYPE, | 800 | EXTRACTOR_METATYPE_MIMETYPE, |
797 | EXTRACTOR_METATYPE_FORMAT, | 801 | EXTRACTOR_METATYPE_FORMAT, |
@@ -807,8 +811,8 @@ add_search_result (struct SearchTab *tab, | |||
807 | NULL, | 811 | NULL, |
808 | G_MAXINT, | 812 | G_MAXINT, |
809 | 0, GNUNET_CONTAINER_meta_data_duplicate (meta), | 813 | 0, GNUNET_CONTAINER_meta_data_duplicate (meta), |
810 | 1, GNUNET_FS_uri_dup (uri), | 814 | 1, (uri == NULL) ? NULL : GNUNET_FS_uri_dup (uri), |
811 | 2, GNUNET_FS_uri_chk_get_file_size (uri), | 815 | 2, (uri == NULL) ? 0 : GNUNET_FS_uri_chk_get_file_size (uri), |
812 | 3, pixbuf /* preview */, | 816 | 3, pixbuf /* preview */, |
813 | 4, 0 /* percent progress */, | 817 | 4, 0 /* percent progress */, |
814 | 5, 0 /* percent availability */, | 818 | 5, 0 /* percent availability */, |