diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-01-12 18:32:06 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-01-12 18:32:06 +0000 |
commit | 8ffc2e753b04a9e794e7a6302d57d590b311e41f (patch) | |
tree | 35fbdc52b4365c8f0af8c5ff2c71952901965aff | |
parent | 74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9 (diff) | |
download | netsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.gz netsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.bz2 |
Avoid accessing NULL pointer
-rw-r--r-- | frontends/amiga/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c index 88a875ec1..c354fef3c 100644 --- a/frontends/amiga/menu.c +++ b/frontends/amiga/menu.c @@ -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", |