Null-check keys in midori_load_extensions
This commit is contained in:
parent
41dda877ba
commit
d089634f6c
1 changed files with 3 additions and 2 deletions
|
@ -1304,18 +1304,19 @@ midori_load_extensions (gpointer data)
|
||||||
extensions = katze_array_new (MIDORI_TYPE_EXTENSION);
|
extensions = katze_array_new (MIDORI_TYPE_EXTENSION);
|
||||||
g_signal_connect (extensions, "update", G_CALLBACK (extensions_update_cb), app);
|
g_signal_connect (extensions, "update", G_CALLBACK (extensions_update_cb), app);
|
||||||
g_object_set (app, "extensions", extensions, NULL);
|
g_object_set (app, "extensions", extensions, NULL);
|
||||||
|
|
||||||
if (g_module_supported ())
|
if (g_module_supported ())
|
||||||
{
|
{
|
||||||
gchar* extension_path;
|
gchar* extension_path;
|
||||||
if ((extension_path = midori_app_get_lib_path (PACKAGE_NAME)))
|
if (keys && (extension_path = midori_app_get_lib_path (PACKAGE_NAME)))
|
||||||
{
|
{
|
||||||
gint i = 0;
|
gint i = 0;
|
||||||
const gchar* filename;
|
const gchar* filename;
|
||||||
while ((filename = keys[i++]))
|
while ((filename = keys[i++]))
|
||||||
midori_load_module (app, extension_path, filename, TRUE);
|
midori_load_module (app, extension_path, filename, TRUE);
|
||||||
}
|
|
||||||
g_free (extension_path);
|
g_free (extension_path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
g_strfreev (keys);
|
g_strfreev (keys);
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
|
Loading…
Reference in a new issue