From a90f908bbfffffab3e9ae68d78f37c1a0bf400bf Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 8 Feb 2002 18:07:25 +0000 Subject: [PATCH] fix spurious libxml warning Original commit message from CVS: fix spurious libxml warning --- gst/gstplugin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 52f311986a..be9b08e25f 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -62,6 +62,7 @@ void _gst_plugin_initialize (void) { GList *gst_plugin_default_paths = NULL; + struct stat stat_buf; #ifndef GST_DISABLE_REGISTRY xmlDocPtr doc = NULL; xmlNodePtr root; @@ -89,8 +90,10 @@ _gst_plugin_initialize (void) #endif /* PLUGINS_USE_BUILDDIR */ #ifndef GST_DISABLE_REGISTRY - doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml"); - g_assert (doc != NULL); + if (stat (GST_CONFIG_DIR"/reg.xml", &stat_buf) == 0) + doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml"); + else + doc = NULL; if (!doc || !doc->xmlRootNode ||