Check PLUGINDIR after loading the builtin plugins
diff --git a/src/plugin.c b/src/plugin.c
index 706a14f..b48f1ce 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -116,9 +116,6 @@
gchar **disabled;
unsigned int i;
- if (strlen(PLUGINDIR) == 0)
- return FALSE;
-
/* Make a call to BtIO API so its symbols got resolved before the
* plugins are loaded. */
bt_io_error_quark();
@@ -140,6 +137,9 @@
add_plugin(NULL, __bluetooth_builtin[i]);
}
+ if (strlen(PLUGINDIR) == 0)
+ return FALSE;
+
debug("Loading plugins %s", PLUGINDIR);
dir = g_dir_open(PLUGINDIR, 0, NULL);