[Xfce4-commits] <midori:master> Null-check keys in midori_load_extensions

Christian Dywan noreply at xfce.org
Mon Jul 9 20:48:02 CEST 2012


Updating branch refs/heads/master
         to d089634f6ca8a99f90901d035f5fe3fe5b54dec3 (commit)
       from 41dda877ba6b14fc76befc496600500e94529f1c (commit)

commit d089634f6ca8a99f90901d035f5fe3fe5b54dec3
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jul 9 20:46:56 2012 +0200

    Null-check keys in midori_load_extensions

 midori/main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 7b3d206..4cbe08a 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -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);
 


More information about the Xfce4-commits mailing list