summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon/gvfsbackendgphoto2.c2
-rw-r--r--daemon/gvfsbackendlocaltest.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 4fe76f76..0bf346a1 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -1497,7 +1497,7 @@ ensure_ignore_prefix (GVfsBackendGphoto2 *gphoto2_backend, GVfsJob *job)
}
/* Some cameras, such as the Canon 5D, won't report the basedir */
- if (head->fields & GP_STORAGEINFO_BASE)
+ if (head && head->fields & GP_STORAGEINFO_BASE)
prefix = g_strdup_printf ("%s/", head->basedir);
out:
diff --git a/daemon/gvfsbackendlocaltest.c b/daemon/gvfsbackendlocaltest.c
index d1fcc926..62b5193d 100644
--- a/daemon/gvfsbackendlocaltest.c
+++ b/daemon/gvfsbackendlocaltest.c
@@ -154,7 +154,7 @@ get_g_file_info_from_local (const char *filename, GFile *file,
error = NULL;
info = g_file_query_info (file, attributes, flags, G_VFS_JOB (job)->cancellable, &error);
- if ((error) || (! info) ) {
+ if (info == NULL) {
g_print (" (EE) get_g_file_info_from_local (filename = '%s'): g_file_query_info failed: %s \n", filename, error->message);
g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
return NULL;
@@ -392,7 +392,7 @@ do_query_fs_info (GVfsBackend *backend,
if (file) {
error = NULL;
info2 = g_file_query_filesystem_info (file, "fs:*", G_VFS_JOB (job)->cancellable, &error);
- if ((error) || (! info2) ) {
+ if (info2 == NULL) {
g_print (" (EE) try_query_fs_info (filename = '%s'): g_file_query_filesystem_info failed: %s \n", filename, error->message);
g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
g_error_free (error);