From: Miroslav Lichvar Date: Thu, 17 Sep 2009 15:30:11 +0000 (+0200) Subject: fix isMapped initialization and check in label X-Git-Tag: r0-52-11~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=623cd25ea6b92b7f973a2a9b9c20cfb1c9cfeb3c;p=thirdparty%2Fnewt.git fix isMapped initialization and check in label --- 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);