From c1f241386f472da807f7d43027cc6a6a26f57f50 Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Wed, 26 Mar 2003 15:51:31 +0000 Subject: [PATCH] 0.8.11claws49 * src/mimeview.c fix mime type guessing when no mime type is found for a file --- ChangeLog.claws | 5 +++++ configure.ac | 2 +- src/mimeview.c | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 27b31a71c..d0f636cf7 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2003-03-26 [christoph] 0.8.11claws49 + + * src/mimeview.c + fix mime type guessing when no mime type is found for a file + 2003-03-25 [christoph] 0.8.11claws48 * src/mimeview.c diff --git a/configure.ac b/configure.ac index b3964ccfa..f9f7cf14a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=11 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws48 +EXTRA_VERSION=claws49 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/mimeview.c b/src/mimeview.c index 7d7ddf619..14b27166b 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -511,7 +511,7 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar * static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinfo) { gchar *content_type = NULL; - MimeViewer *viewer; + MimeViewer *viewer = NULL; if ((partinfo->mime_type == MIME_APPLICATION_OCTET_STREAM) && (partinfo->name != NULL)) { @@ -520,8 +520,10 @@ static MimeViewer *get_viewer_for_mimeinfo(MimeView *mimeview, MimeInfo *partinf content_type = g_strdup(partinfo->content_type); } - viewer = get_viewer_for_content_type(mimeview, content_type); - g_free(content_type); + if (content_type != NULL) { + viewer = get_viewer_for_content_type(mimeview, content_type); + g_free(content_type); + } return viewer; } -- 2.25.1