From 019043df82b923e2309a8ffad00f25dcba3ca5a7 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 27 Apr 2005 00:02:02 +0000 Subject: [project @ 2005-04-27 00:02:02 by rjw] Remove NULL read for no matching URLs svn path=/import/netsurf/; revision=1687 --- riscos/url_complete.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscos/url_complete.c b/riscos/url_complete.c index 33151f3f9..6c63a3312 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -180,7 +180,6 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) { } url_complete_matches[url_complete_matches_available - 1] = output; - } /* update the window */ @@ -200,7 +199,7 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key) { lines = MAXIMUM_VISIBLE_LINES; if (lines > url_complete_matches_available) lines = url_complete_matches_available; - for (i = 0; i < MAXIMUM_VISIBLE_LINES; i++) { + for (i = 0; i < lines; i++) { if (url_complete_redraw[i] != url_complete_matches[i]) { error = xwimp_force_redraw(dialog_url_complete, 0, -(i + 1) * 44, 65536, -i * 44); @@ -326,6 +325,7 @@ void ro_gui_url_complete_resize(struct gui_window *g, wimp_open *open) { * or there is no URL bar shown, or there are no URL matches, close it */ if ((open->w != url_complete_parent) || (!g->toolbar) || (!g->toolbar->display_url) || + (!url_complete_matches) || (url_complete_matches_available == 0)) { ro_gui_url_complete_close(NULL, 0); return; -- cgit v1.2.3