From 21152104d296939c2babecd8999b03c325de0b2c Mon Sep 17 00:00:00 2001 From: reinelt Date: Wed, 26 May 2004 11:37:36 +0000 Subject: [lcd4linux @ 2004-05-26 11:37:35 by reinelt] Curses driver ported. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@436 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'widget.c') diff --git a/widget.c b/widget.c index 2eaf240..e7be927 100644 --- a/widget.c +++ b/widget.c @@ -1,4 +1,4 @@ -/* $Id: widget.c,v 1.13 2004/03/03 03:47:04 reinelt Exp $ +/* $Id: widget.c,v 1.14 2004/05/26 11:37:36 reinelt Exp $ * * generic widget handling * @@ -21,6 +21,10 @@ * * * $Log: widget.c,v $ + * Revision 1.14 2004/05/26 11:37:36 reinelt + * + * Curses driver ported. + * * Revision 1.13 2004/03/03 03:47:04 reinelt * big patch from Martin Hejl: * - use qprintf() where appropriate @@ -180,11 +184,12 @@ int widget_add (char *name, int row, int col) break; } } - if (class) free (class); if (i==nClasses) { - error ("widget '%s': class '%s' not supported"); + error ("widget '%s': class '%s' not supported", name, class); + if (class) free (class); return -1; } + if (class) free (class); // do NOT use realloc here because there may be pointers to the old // memory area, which would point to nowhere if realloc moves the area -- cgit v1.2.3