From 9fc4e67fefd3e782d57112b0f311db889f5a7ed9 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 1 Jun 2004 01:11:44 +0000 Subject: fix segfault when no mimeType in a stream git-svn-id: https://svn.musicpd.org/mpd/trunk@1269 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inputPlugin.c b/src/inputPlugin.c index 72286d3f6..ee2b0c79c 100644 --- a/src/inputPlugin.c +++ b/src/inputPlugin.c @@ -51,6 +51,8 @@ InputPlugin * getInputPluginFromMimeType(char * mimeType) { ListNode * node = inputPlugin_list->firstNode; InputPlugin * plugin = NULL; + if(mimeType == NULL) return NULL; + while(node != NULL) { plugin = node->data; if(stringFoundInStringArray(plugin->mimeTypes, mimeType)) { -- cgit v1.2.3