summaryrefslogtreecommitdiff
path: root/desktop/selection.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-13 17:38:09 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-13 17:38:09 +0100
commit86f3e70f1af9130c2f24638fd560804ccb736af8 (patch)
tree33715b3cfe996290cd26148206ebe59097d5c4bd /desktop/selection.c
parente9b036a794fc0b7b453581c4c3e017176213df6c (diff)
downloadnetsurf-86f3e70f1af9130c2f24638fd560804ccb736af8.tar.gz
netsurf-86f3e70f1af9130c2f24638fd560804ccb736af8.tar.bz2
Tolerate NULL selection context in selection_get_copy.
Diffstat (limited to 'desktop/selection.c')
-rw-r--r--desktop/selection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/selection.c b/desktop/selection.c
index abe9e0114..cd19afd16 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -892,7 +892,7 @@ char * selection_get_copy(struct selection *s)
.length = 0
};
- if (!s->defined)
+ if (s == NULL || !s->defined)
return NULL;
if (!selection_traverse(s, selection_copy_handler, &sel_string)) {