* fhandler_tty.cc (fhandler_tty_slave::close): Avoid potential crash
if former open call has been unsuccessful.
This commit is contained in:
parent
ce3124dc19
commit
ed32dd8946
|
@ -1,3 +1,8 @@
|
|||
2010-04-02 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_tty.cc (fhandler_tty_slave::close): Avoid potential crash
|
||||
if former open call has been unsuccessful.
|
||||
|
||||
2010-04-01 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* nlsfuncs.cc: Fix indentation.
|
||||
|
|
|
@ -613,10 +613,11 @@ fhandler_tty_slave::close ()
|
|||
close this normally. cgf 2006-05-20 */
|
||||
cygheap->manage_console_count ("fhandler_tty_slave::close", -1);
|
||||
|
||||
archetype->usecount--;
|
||||
if (archetype)
|
||||
archetype->usecount--;
|
||||
report_tty_counts (this, "closed", "");
|
||||
|
||||
if (archetype->usecount)
|
||||
if (archetype && archetype->usecount)
|
||||
{
|
||||
#ifdef DEBUGGING
|
||||
if (archetype->usecount < 0)
|
||||
|
|
Loading…
Reference in New Issue