[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 05/08: Fix crash when categories have empty icons or names.
noreply at xfce.org
noreply at xfce.org
Sat Aug 20 18:33:40 CEST 2016
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to annotated tag v1.0.3
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit b3b411a67a6bf7a039968480f3ba2b684ed633f9
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 9482940..591b43f 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