summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tk/text.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tk/text.c b/src/tk/text.c
index 5d61682..1a84a14 100644
--- a/src/tk/text.c
+++ b/src/tk/text.c
@@ -97,6 +97,8 @@ _mftk_text_key_event(struct mftk_widget *w, SDL_Event *e)
for (i = t->cur; i < len; ++i) {
t->val[i] = t->val[i + 1];
}
+ SDL_DestroyTexture(t->texture);
+ t->texture = NULL;
break;
case SDLK_DELETE:
len = strlen(t->val);
@@ -106,13 +108,12 @@ _mftk_text_key_event(struct mftk_widget *w, SDL_Event *e)
for (i = t->cur; i < len; ++i) {
t->val[i] = t->val[i + 1];
}
+ SDL_DestroyTexture(t->texture);
+ t->texture = NULL;
break;
default:
break;
}
- /* TODO */
- SDL_DestroyTexture(t->texture);
- t->texture = NULL;
break;
default:
break;