From 0c2d823a7955981e88f7cb5b718a7081d97104f0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 7 Dec 2015 14:32:52 +0000 Subject: 37337: Delay freeing widget until not in use. --- Src/Zle/zle_thingy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Src/Zle/zle_thingy.c') diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 271fd8efc..21495b6f2 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -253,9 +253,14 @@ unbindwidget(Thingy t, int override) /* Free a widget. */ /**/ -static void +void freewidget(Widget w) { + if (w->flags & WIDGET_INUSE) { + w->flags |= WIDGET_FREE; + return; + } + if (w->flags & WIDGET_NCOMP) { zsfree(w->u.comp.wid); zsfree(w->u.comp.func); -- cgit 1.4.1