termptyext: fix eina_stringshare_del() on bad pointer

This commit is contained in:
Boris Faure 2019-02-21 18:43:11 +01:00
parent e024618dba
commit 16637c3515
1 changed files with 3 additions and 3 deletions

View File

@ -255,12 +255,12 @@ _handle_selection_is(Termpty *ty,
{ {
size_t len = 0; size_t len = 0;
Termio *sd; Termio *sd;
const char *s; const char *sel, *s;
assert(ty->selection.is_active); assert(ty->selection.is_active);
sd = termio_get_from_obj(ty->obj); sd = termio_get_from_obj(ty->obj);
s = termio_internal_get_selection(sd, &len); sel = s = termio_internal_get_selection(sd, &len);
assert(s != NULL && "no selection"); assert(s != NULL && "no selection");
@ -277,7 +277,7 @@ _handle_selection_is(Termpty *ty,
} }
buf++; buf++;
} }
eina_stringshare_del(s); eina_stringshare_del(sel);
} }
static void static void