Latest Exp Panel segfaulting

Jasper Huijsmans jasper at xfce.org
Wed Sep 21 08:55:22 CEST 2005


Biju Chacko schreef:
> This fixes it
> 
> Index: panel/panel-item-manager.c
> ===================================================================
> --- panel/panel-item-manager.c  (revision 17710)
> +++ panel/panel-item-manager.c  (working copy)
> @@ -218,7 +218,7 @@
>           dirs = xfce_resource_dirs (XFCE_RESOURCE_DATA);
>       }
> 
> -    for (d = dirs; *d != NULL || !datadir_used; ++d)
> +    for (d = dirs; *d != NULL && !datadir_used; ++d)
>       {
>           GDir *gdir;
>           char *dirname;
> 

Unfortunately, this is wrong. I _really_ don't understand why that would 
work.

The goal of this code is to make sure that the installation prefix is 
searched even when it is not part of the resource directories.

How about this?

Index: panel-item-manager.c
===================================================================
--- panel-item-manager.c        (revision 17710)
+++ panel-item-manager.c        (working copy)
@@ -274,6 +274,9 @@

          g_free (dirname);
          g_dir_close (gdir);
+
+        if (*d == NULL)
+            break;
      }

      g_strfreev (dirs);




More information about the Xfce4-dev mailing list