aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/audio-inline
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/audio-inline')
-rw-r--r--plugins/audio-inline/ChangeLog7
-rw-r--r--plugins/audio-inline/audio-inline.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/audio-inline/ChangeLog b/plugins/audio-inline/ChangeLog
index 98a3dbbc8f..9236ac4af8 100644
--- a/plugins/audio-inline/ChangeLog
+++ b/plugins/audio-inline/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #350539
+
+ * audio-inline.c: (org_gnome_audio_inline_play_clicked):
+ Ensures non-NULL part.
+
2006-01-09 Kjartan Maraas <kmaraas@gnome.org>
* audio-inline.c: (org_gnome_audio_inline_add_button):
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index dd9621ce6b..615e06446c 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -214,14 +214,16 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob
d(printf ("audio inline formatter: init gst thread\n"));
if (gst_init_check (&argc, (char ***) &argv)) {
- CamelContentType *type;
+ CamelContentType *type = NULL;
GstElement *filesrc;
/* create a disk reader */
filesrc = gst_element_factory_make ("filesrc", "disk_source");
g_object_set (G_OBJECT (filesrc), "location", po->filename, NULL);
- type = camel_mime_part_get_content_type (po->part);
+ if (po->part)
+ type = camel_mime_part_get_content_type (po->part);
+
if (type) {
if (!g_ascii_strcasecmp (type->type, "audio")) {
if (!g_ascii_strcasecmp (type->subtype, "mpeg") || !g_ascii_strcasecmp (type->subtype, "x-mpeg")