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.
This commit is contained in:
Richard Boulton 2001-04-03 04:38:35 +00:00
parent c3a64ce1f6
commit 9416c3c7aa

View file

@ -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");