summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-01-12 18:32:06 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2017-01-12 18:32:06 (GMT)
commit8ffc2e753b04a9e794e7a6302d57d590b311e41f (patch)
tree35fbdc52b4365c8f0af8c5ff2c71952901965aff
parent74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9 (diff)
downloadnetsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.gz
netsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.bz2
Avoid accessing NULL pointer
-rw-r--r--frontends/amiga/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 88a875e..c354fef 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",