X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesapp.cc;h=e1ffa7a47efe413179e53154b8cd88485e17f839;hp=c85e4f74555d8da85979f25c389b803603af06a6;hb=97df2f335617625b7355c04e46175e316ef02544;hpb=1559c1ba9c1d51764c46cb99be22a14deea5ce60 diff --git a/c++/cursesapp.cc b/c++/cursesapp.cc index c85e4f74..e1ffa7a4 100644 --- a/c++/cursesapp.cc +++ b/c++/cursesapp.cc @@ -1,6 +1,6 @@ // * this is for making emacs happy: -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2019 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,12 +29,13 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1997 * + * and: Thomas E. Dickey * ****************************************************************************/ #include "internal.h" #include "cursesapp.h" -MODULE_ID("$Id: cursesapp.cc,v 1.14 2007/01/27 20:16:42 tom Exp $") +MODULE_ID("$Id: cursesapp.cc,v 1.16 2019/07/28 19:55:27 tom Exp $") void NCursesApplication::init(bool bColors) @@ -67,7 +68,7 @@ NCursesApplication* NCursesApplication::theApp = 0; NCursesWindow* NCursesApplication::titleWindow = 0; NCursesApplication::SLK_Link* NCursesApplication::slk_stack = 0; -NCursesApplication::~NCursesApplication() +NCursesApplication::~NCursesApplication() THROWS(NCursesException) { Soft_Label_Key_Set* S; @@ -108,8 +109,11 @@ bool NCursesApplication::pop() SLK_Link* L = slk_stack; slk_stack = slk_stack->prev; delete L; - if (Root_Window && top()) - top()->show(); + if (Root_Window) { + Soft_Label_Key_Set* xx = top(); + if (xx != 0) + xx->show(); + } } return (slk_stack ? FALSE : TRUE); }