Skip to content

Commit

Permalink
ev-message-area.c: Check that the GtkStockItem is initialized
Browse files Browse the repository at this point in the history
before attempting to access it.

Solution by @dev0two
Fixes #617
  • Loading branch information
mtwebster committed Aug 14, 2023
1 parent 06b18a8 commit 31c9f12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shell/ev-message-area.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ ev_message_area_set_image_for_type (EvMessageArea *area,
if (icon_name) {
GtkStockItem item;

gtk_stock_lookup (icon_name, &item);
atk_object_set_name (atk_obj, item.label);
if (gtk_stock_lookup (icon_name, &item)) {
atk_object_set_name (atk_obj, item.label);
}
}
}
}
Expand Down

0 comments on commit 31c9f12

Please sign in to comment.