[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 68/473: Fix crash when categories have empty icons or names.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:53:58 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 0de7f7b9f2bd15bd14630e3ea94f1cabe4a7a1b2
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Jul 5 11:28:07 2013 -0400

    Fix crash when categories have empty icons or names.
---
 src/applications_page.cpp |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index 7013155..1992db5 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -37,10 +37,18 @@ using namespace WhiskerMenu;
 ApplicationsPage::Category::Category(GarconMenuDirectory* directory)
 {
 	// Fetch icon
-	m_icon = garcon_menu_directory_get_icon_name(directory);
+	const gchar* icon = garcon_menu_directory_get_icon_name(directory);
+	if (G_LIKELY(icon))
+	{
+		m_icon.assign(icon);
+	}
 
 	// Fetch text
-	m_text = garcon_menu_directory_get_name(directory);
+	const gchar* text = garcon_menu_directory_get_name(directory);
+	if (G_LIKELY(text))
+	{
+		m_text.assign(text);
+	}
 }
 
 //-----------------------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list