]> spindle.queued.net Git - midori/commitdiff
Check that extension_path exists before opening it
authorChristian Dywan <christian@twotoasts.de>
Tue, 13 Sep 2011 23:56:03 +0000 (01:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 13 Sep 2011 23:56:03 +0000 (01:56 +0200)
midori/main.c

index 99230d02a5777de790d65022c5d75fcdaddc0ebb..0230e49ac64e682c166c793236c9ad39c2129d08 100644 (file)
@@ -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;