[Xfce4-commits] <midori:master> Check that extension_path exists before opening it

Christian Dywan noreply at xfce.org
Wed Sep 14 02:46:05 CEST 2011


Updating branch refs/heads/master
         to e55a0a91cb18b94e7ce8f0ce75793c45901ea3ec (commit)
       from 18a0d1da035b40ce653739fe36df0542d49e5a01 (commit)

commit e55a0a91cb18b94e7ce8f0ce75793c45901ea3ec
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Sep 14 01:56:03 2011 +0200

    Check that extension_path exists before opening it

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

diff --git a/midori/main.c b/midori/main.c
index 99230d0..0230e49 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1212,11 +1212,12 @@ midori_load_extensions (gpointer data)
     if (g_module_supported ())
     {
         gchar* extension_path;
-        GDir* extension_dir;
+        GDir* extension_dir = NULL;
 
         if (!(extension_path = g_strdup (g_getenv ("MIDORI_EXTENSION_PATH"))))
             extension_path = sokoke_find_lib_path (PACKAGE_NAME);
-        extension_dir = g_dir_open (extension_path, 0, NULL);
+        if (extension_path != NULL)
+            extension_dir = g_dir_open (extension_path, 0, NULL);
         if (extension_dir != NULL)
         {
             const gchar* filename;


More information about the Xfce4-commits mailing list