[maemo-commits] [maemo-commits] r8323 - in projects/haf/trunk/maemo-af-desktop: . libhildonmenu

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Mon Nov 27 12:32:22 EET 2006
Author: jobi
Date: 2006-11-27 12:32:21 +0200 (Mon, 27 Nov 2006)
New Revision: 8323

Modified:
   projects/haf/trunk/maemo-af-desktop/ChangeLog
   projects/haf/trunk/maemo-af-desktop/libhildonmenu/libhildonmenu.c
Log:

2006-11-24  Johan Bilien <johan.bilien at nokia.com>

	* libhildonmenu/libhildonmenu.c: Fixed a potential crash when
	no Type = is provided in the .desktop file. Fixed: NB#48428



Modified: projects/haf/trunk/maemo-af-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-11-27 09:59:52 UTC (rev 8322)
+++ projects/haf/trunk/maemo-af-desktop/ChangeLog	2006-11-27 10:32:21 UTC (rev 8323)
@@ -1,5 +1,10 @@
 2006-11-24  Johan Bilien <johan.bilien at nokia.com>
 
+	* libhildonmenu/libhildonmenu.c: Fixed a potential crash when
+	no Type = is provided in the .desktop file. Fixed: NB#48428
+
+2006-11-24  Johan Bilien <johan.bilien at nokia.com>
+
 	* configure.ac: 2.9.99.9
 
 2006-11-24  Johan Bilien <johan.bilien at nokia.com>

Modified: projects/haf/trunk/maemo-af-desktop/libhildonmenu/libhildonmenu.c
===================================================================
--- projects/haf/trunk/maemo-af-desktop/libhildonmenu/libhildonmenu.c	2006-11-27 09:59:52 UTC (rev 8322)
+++ projects/haf/trunk/maemo-af-desktop/libhildonmenu/libhildonmenu.c	2006-11-27 10:32:21 UTC (rev 8323)
@@ -274,6 +274,7 @@
 		} else if (S_ISREG(buf.st_mode) &&
 				g_str_has_suffix(current_path,
 					DESKTOP_FILE_SUFFIX)) {
+            gchar *type = NULL;
 
 			key_file = g_key_file_new();
 
@@ -293,11 +294,11 @@
 			}
 						
 
-			gchar *type = g_key_file_get_string(
-					key_file,
-					DESKTOP_ENTRY_GROUP,
-					DESKTOP_ENTRY_TYPE_FIELD,
-					NULL);
+			type = g_key_file_get_string(
+                                         key_file,
+                                         DESKTOP_ENTRY_GROUP,
+                                         DESKTOP_ENTRY_TYPE_FIELD,
+                                         NULL);
 
 			/* We're only interested in apps */
 			if ( !type || strcmp(type, "Application") != 0 ) {


More information about the maemo-commits mailing list