aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/c++/cursesf.cc
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-10-11 07:31:01 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-10-11 07:31:01 +0000
commit18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (patch)
tree9ec00b41242bbe63b83c0ac5316c539466d9f9de /contrib/ncurses/c++/cursesf.cc
parent15589c42fa2774d2f8ee650f4f31eb8d3a861316 (diff)
downloadsrc-18259542b2f8fa7e3f76f4bb0dd37995dfd424aa.tar.gz
src-18259542b2f8fa7e3f76f4bb0dd37995dfd424aa.zip
Import ncurses-5.1-20001009 onto the vendor branch
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=66963
Diffstat (limited to 'contrib/ncurses/c++/cursesf.cc')
-rw-r--r--contrib/ncurses/c++/cursesf.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/ncurses/c++/cursesf.cc b/contrib/ncurses/c++/cursesf.cc
index a993322b8657..a3b066cb51ef 100644
--- a/contrib/ncurses/c++/cursesf.cc
+++ b/contrib/ncurses/c++/cursesf.cc
@@ -35,7 +35,7 @@
#include "cursesapp.h"
#include "internal.h"
-MODULE_ID("$Id: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $")
+MODULE_ID("$Id: 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;
}