Commit 226f1eae authored by Will Thompson's avatar Will Thompson Committed by Simon McVittie

plugin-loader: clear GError after g_dir_open fails

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66085Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 892d6d57
......@@ -108,7 +108,6 @@ plugin_loader_try_to_load (
static void
gabble_plugin_loader_probe (GabblePluginLoader *self)
{
GError *error = NULL;
const gchar *directory_names = g_getenv ("GABBLE_PLUGIN_DIR");
gchar **dir_array;
gchar **ptr;
......@@ -132,13 +131,15 @@ gabble_plugin_loader_probe (GabblePluginLoader *self)
for (ptr = dir_array ; *ptr != NULL ; ptr++)
{
GError *error = NULL;
DEBUG ("probing %s", *ptr);
d = g_dir_open (*ptr, 0, &error);
if (d == NULL)
{
DEBUG ("%s", error->message);
g_error_free (error);
g_clear_error (&error);
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment