[sawfish] improved apps-menu in category-loading (more robustness)



commit 3dac3dd1098b511d7a6d05f9491c5b4dbc3cbbed
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Thu Feb 10 19:42:02 2011 +0100

    improved apps-menu in category-loading (more robustness)

 lisp/sawfish/wm/ext/apps-menu.jl |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/lisp/sawfish/wm/ext/apps-menu.jl b/lisp/sawfish/wm/ext/apps-menu.jl
index 0c4b4d0..4a96a6d 100644
--- a/lisp/sawfish/wm/ext/apps-menu.jl
+++ b/lisp/sawfish/wm/ext/apps-menu.jl
@@ -507,13 +507,15 @@ If `display-test' is not defined, will return the input desktop-file-list."
     "Split a desktop entry into several entries, each containing one
 of the categories of the original."
     (when fdol
-      (let ((new-fdol fdol))
-	(let loop ((categories
-		    (delete "" (string-split ";" (cdr (assoc "Categories" fdol))))))
-	     (when categories
-	       (append (list 
-			(append new-fdol (list (cons "Category" (car categories)))))
-		       (loop (cdr categories))))))))
+      (let ((new-fdol fdol)
+	    (category-string (cdr (assoc "Categories" fdol))))
+	(when (stringp category-string)
+	  (let loop ((categories
+		      (delete "" (string-split ";" category-string))))
+	       (when categories
+		 (append (list 
+			  (append new-fdol (list (cons "Category" (car categories)))))
+			 (loop (cdr categories)))))))))
 
   ;; Sawfish-menu generation
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]