[gthumb] Fix NULL crasher in local_path verifying code
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Fix NULL crasher in local_path verifying code
- Date: Fri, 8 May 2009 08:10:21 -0400 (EDT)
commit 812877700840caadcde45858324b14fc81518596
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Fri May 8 08:09:09 2009 -0400
Fix NULL crasher in local_path verifying code
---
libgthumb/file-data.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libgthumb/file-data.c b/libgthumb/file-data.c
index 83d0588..5d78475 100644
--- a/libgthumb/file-data.c
+++ b/libgthumb/file-data.c
@@ -63,12 +63,13 @@ load_info (FileData *fd)
GError *error = NULL;
GTimeVal tv;
- gfile = gfile_new (fd->path);
-
g_free (fd->local_path);
+ gfile = gfile_new (fd->path);
fd->local_path = g_file_get_path (gfile);
- if ( !is_local_file (fd->utf8_path) && ! strstr (fd->local_path, ".gvfs")) {
+ if ( (fd->local_path != NULL) &&
+ ! is_local_file (fd->utf8_path) &&
+ ! strstr (fd->local_path, ".gvfs")) {
/* This can happen when running gThumb over ssh with X-forwarding.
I don't know why, exactly. Possibly a gio bug. */
g_warning ("Unexpected error: %s is not a valid mount point for %s",fd->local_path,fd->utf8_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]