]> spindle.queued.net Git - midori/commitdiff
Null-check keys in midori_load_extensions
authorChristian Dywan <christian@twotoasts.de>
Mon, 9 Jul 2012 18:46:56 +0000 (20:46 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 9 Jul 2012 18:46:56 +0000 (20:46 +0200)
midori/main.c

index 7b3d20607b3ad0d843b8f42fe22eaf4788810803..4cbe08a9cf1dbed54cabcbbd8cbd393909794d12 100644 (file)
@@ -1304,17 +1304,18 @@ midori_load_extensions (gpointer data)
     extensions = katze_array_new (MIDORI_TYPE_EXTENSION);
     g_signal_connect (extensions, "update", G_CALLBACK (extensions_update_cb), app);
     g_object_set (app, "extensions", extensions, NULL);
+
     if (g_module_supported ())
     {
         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;
             const gchar* filename;
             while ((filename = keys[i++]))
                 midori_load_module (app, extension_path, filename, TRUE);
+            g_free (extension_path);
         }
-        g_free (extension_path);
     }
     g_strfreev (keys);