Tolerate NULL selection context in selection_get_copy.

This commit is contained in:
Michael Drake 2012-08-13 17:38:09 +01:00
parent e9b036a794
commit 86f3e70f1a
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {