From a81407a537bfd1ab9e48c69007eb6b30e66d271b Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 11 Oct 2000 07:31:01 +0000 Subject: Import ncurses-5.1-20001009 onto the vendor branch --- contrib/ncurses/c++/cursesf.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'contrib/ncurses/c++/cursesf.cc') diff --git a/contrib/ncurses/c++/cursesf.cc b/contrib/ncurses/c++/cursesf.cc index a993322..a3b066c 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; } -- cgit v1.1