Windows compilation fixes
[libs/core.git] / source / io / pipe.cpp
index 639743f4ca79cab6ad1733383d69e5ff77e9556b..0f206981f11c6d1e205d127d281655965559187e 100644 (file)
@@ -28,7 +28,7 @@ Pipe::Pipe():
        if(!write_handle)
        {
                unsigned err = GetLastError();
-               CloseHandle(*handle[0]);
+               CloseHandle(*read_handle);
                throw system_error(format("CreateFile(%s)", name), err);
        }
 #else