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

View File

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