Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crash when categories have empty icons or names.

  • Loading branch information...
commit b3b411a67a6bf7a039968480f3ba2b684ed633f9 1 parent 6c1c614
@gottcode authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/applications_page.cpp
View
12 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);
+ }
}
//-----------------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.