Bugfix: Check stdoutWatch before removing the handler.

This commit is contained in:
Juerg Haefliger 2011-08-10 17:03:23 +02:00 committed by Eric Blake
parent cdbb27e3bb
commit ed009313b1
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ virConsoleShutdown(virConsolePtr con)
virStreamFree(con->st); virStreamFree(con->st);
if (con->stdinWatch != -1) if (con->stdinWatch != -1)
virEventRemoveHandle(con->stdinWatch); virEventRemoveHandle(con->stdinWatch);
if (con->stdinWatch != -1) if (con->stdoutWatch != -1)
virEventRemoveHandle(con->stdoutWatch); virEventRemoveHandle(con->stdoutWatch);
con->stdinWatch = -1; con->stdinWatch = -1;
con->stdoutWatch = -1; con->stdoutWatch = -1;