summaryrefslogtreecommitdiff
path: root/riscos/url_complete.c
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2015-07-18 23:29:51 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2015-07-18 23:30:15 +0100
commita470aacdb2e01b52d59ebe9575dda9e46c00d593 (patch)
tree3d11cbf58ed901bb682527e5345f8bdfa544e864 /riscos/url_complete.c
parentabc7a71117e4ae03f9b7146ce3f299a4b931b1ef (diff)
downloadnetsurf-a470aacdb2e01b52d59ebe9575dda9e46c00d593.tar.gz
netsurf-a470aacdb2e01b52d59ebe9575dda9e46c00d593.tar.bz2
RISCOS: fix obvious NULL dereferences in URL complete.
Diffstat (limited to 'riscos/url_complete.c')
-rw-r--r--riscos/url_complete.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/riscos/url_complete.c b/riscos/url_complete.c
index 3d189a01d..ff91b1c18 100644
--- a/riscos/url_complete.c
+++ b/riscos/url_complete.c
@@ -85,10 +85,11 @@ void ro_gui_url_complete_start(struct toolbar *toolbar)
ro_gui_url_complete_close();
url = ro_toolbar_get_url(toolbar);
-
- url_complete_matched_string = strdup(url);
- if (url_complete_matched_string)
- url_complete_parent = parent;
+ if (url != NULL) {
+ url_complete_matched_string = strdup(url);
+ if (url_complete_matched_string)
+ url_complete_parent = parent;
+ }
}