fix segfault for static plugins
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 5 Apr 2004 10:03:36 +0000 (10:03 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 5 Apr 2004 10:03:36 +0000 (10:03 +0000)
Original commit message from CVS:
fix segfault for static plugins

ChangeLog
gst/gstplugin.c

index 32868a5..1a4d85f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-05  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * gst/gstplugin.c: (gst_plugin_load_file):
+          fix segfault for when original plugin was loaded statically
+
 2004-04-05  Benjamin Otte  <otte@gnome.org>
 
        * testsuite/debug/category.c: (main):
index 04225a7..aca9718 100644 (file)
@@ -330,7 +330,7 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
       } else {
         free_plugin = FALSE;
         if (gst_plugin_is_loaded (plugin)) {
-          if (strcmp (plugin->filename, filename) != 0) {
+          if (plugin->filename && strcmp (plugin->filename, filename) != 0) {
             GST_WARNING
                 ("plugin %p from file \"%s\" with same name %s is already "
                 "loaded, aborting loading of \"%s\"", plugin, plugin->filename,