summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-01-12 18:32:06 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2017-01-12 18:32:06 +0000
commit8ffc2e753b04a9e794e7a6302d57d590b311e41f (patch)
tree35fbdc52b4365c8f0af8c5ff2c71952901965aff /frontends
parent74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9 (diff)
downloadnetsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.gz
netsurf-8ffc2e753b04a9e794e7a6302d57d590b311e41f.tar.bz2
Avoid accessing NULL pointer
Diffstat (limited to 'frontends')
-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 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",