summaryrefslogtreecommitdiff
path: root/lib/libcurses++/cursesf.cc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-07-24 04:06:13 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-07-24 04:06:13 +0000
commit87d5e312fa223e222019a8e0a52d3c51a9db8c11 (patch)
tree3912458699fe4c774c062490d9cc7f478f2a6553 /lib/libcurses++/cursesf.cc
parent87ec33b1645ce0df4e10ca488963124aae5d6aba (diff)
Update to ncurses-5.1-20000722
Diffstat (limited to 'lib/libcurses++/cursesf.cc')
-rw-r--r--lib/libcurses++/cursesf.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libcurses++/cursesf.cc b/lib/libcurses++/cursesf.cc
index 1a88dbcab64..fe9a7a9acf9 100644
--- a/lib/libcurses++/cursesf.cc
+++ b/lib/libcurses++/cursesf.cc
@@ -35,7 +35,7 @@
#include "cursesapp.h"
#include "internal.h"
-MODULE_ID("$From: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $")
+MODULE_ID("$From: cursesf.cc,v 1.11 2000/06/09 16:15:40 juergen Exp $")
NCursesFormField::~NCursesFormField () {
if (field)
@@ -48,7 +48,8 @@ NCursesFormField::~NCursesFormField () {
FIELD**
NCursesForm::mapFields(NCursesFormField* nfields[]) {
int fieldCount = 0,lcv;
-
+ FIELD** old_fields;
+
assert(nfields != 0);
for (lcv=0; nfields[lcv]->field; ++lcv)
@@ -63,8 +64,10 @@ NCursesForm::mapFields(NCursesFormField* nfields[]) {
my_fields = nfields;
- if (form)
- delete[] ::form_fields(form);
+ if (form && (old_fields = ::form_fields(form))) {
+ ::set_form_fields(form,(FIELD**)0);
+ delete[] old_fields;
+ }
return fields;
}