From 623cd25ea6b92b7f973a2a9b9c20cfb1c9cfeb3c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 17 Sep 2009 17:30:11 +0200 Subject: [PATCH] fix isMapped initialization and check in label --- label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/label.c b/label.c index a0c17a4..bc9e510 100644 --- a/label.c +++ b/label.c @@ -37,6 +37,7 @@ newtComponent newtLabel(int left, int top, const char * text) { co->top = top; co->left = left; co->takesFocus = 0; + co->isMapped = 0; la->length = strlen(text); la->text = strdup(text); @@ -65,7 +66,7 @@ void newtLabelSetText(newtComponent co, const char * text) { static void labelDraw(newtComponent co) { struct label * la = co->data; - if (co->isMapped == -1) return; + if (!co->isMapped) return; SLsmg_set_color(COLORSET_LABEL); -- 2.47.2