From 9416c3c7aa459426b6e0ffea12e8ca7eeea05b10 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Tue, 3 Apr 2001 04:38:35 +0000 Subject: [PATCH] Fix obscure segfault I just got: perhaps due to running with libxml 1.8.11 but a worthwhile fix anyway. Original commit message from CVS: Fix obscure segfault I just got: perhaps due to running with libxml 1.8.11 (prerelease version), but a worthwhile fix anyway. --- gst/gstplugin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 8e03ea3aa4..6aa4c1b674 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -88,7 +88,10 @@ _gst_plugin_initialize (void) doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml"); - if (!doc || strcmp (doc->xmlRootNode->name, "GST-PluginRegistry") || + if (!doc || + !doc->xmlRootNode || + doc->xmlRootNode->name == 0 || + strcmp (doc->xmlRootNode->name, "GST-PluginRegistry") || !plugin_times_older_than(get_time(GST_CONFIG_DIR"/reg.xml"))) { if (_gst_warn_old_registry) g_warning ("gstplugin: registry needs rebuild: run gstreamer-register\n");