[gthumb] Added NULL check to gfile_get_mime_type
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Added NULL check to gfile_get_mime_type
- Date: Mon, 8 Jun 2009 08:40:47 -0400 (EDT)
commit 32a0777fa9debd112d81d84bf0ece81c8cfba5a0
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Mon Jun 8 08:40:20 2009 -0400
Added NULL check to gfile_get_mime_type
---
libgthumb/gfile-utils.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libgthumb/gfile-utils.c b/libgthumb/gfile-utils.c
index 99af0ab..7886988 100644
--- a/libgthumb/gfile-utils.c
+++ b/libgthumb/gfile-utils.c
@@ -233,7 +233,7 @@ gfile_get_filename_extension (GFile *file)
const char*
gfile_get_mime_type (GFile *file,
- gboolean fast_file_type)
+ gboolean fast_file_type)
{
const char *value;
const char *result = NULL;
@@ -255,6 +255,9 @@ gfile_get_mime_type (GFile *file,
else
value = g_file_info_get_content_type (info);
+ if (!value)
+ return NULL;
+
/*
* If the file content is determined to be binary data (octet-stream), check for
* HDR file types, which are not well represented in the freedesktop mime database
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]