summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-04-27 00:02:02 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-04-27 00:02:02 +0000
commit019043df82b923e2309a8ffad00f25dcba3ca5a7 (patch)
tree5c8a2b88dd5a65be1169b6f2d006a1ec7bda5012 /riscos
parent8a85a5796507f300df9e32fa8c934fd3520a19a4 (diff)
downloadnetsurf-019043df82b923e2309a8ffad00f25dcba3ca5a7.tar.gz
netsurf-019043df82b923e2309a8ffad00f25dcba3ca5a7.tar.bz2
[project @ 2005-04-27 00:02:02 by rjw]
Remove NULL read for no matching URLs svn path=/import/netsurf/; revision=1687
Diffstat (limited to 'riscos')
-rw-r--r--riscos/url_complete.c4
1 files 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;