mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Avoid accessing NULL pointer
This commit is contained in:
parent
74e73a3b8b
commit
8ffc2e753b
@ -923,7 +923,7 @@ struct Menu *ami_menu_layout(struct ami_menu_data **md, int max)
|
||||
TextLength(rp, md[i]->menulab, strlen(md[i]->menulab)) -
|
||||
icon_width - space_width;
|
||||
|
||||
if((md[i]->menutype == NM_ITEM) && (md[i+1]->menutype == NM_SUB)) {
|
||||
if((md[i]->menutype == NM_ITEM) && md[i+1] && (md[i+1]->menutype == NM_SUB)) {
|
||||
left_posn -= menu_glyph_width[NSA_GLYPH_SUBMENU];
|
||||
|
||||
submenuarrow = NewObject(NULL, "sysiclass",
|
||||
|
Loading…
Reference in New Issue
Block a user