| Index: runtime/bin/eventhandler_win.cc
|
| diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
|
| index fbc562398d297c730c1c9b84532b92653fae4465..3b12d940847b641f4714086de811f645bd2da436 100644
|
| --- a/runtime/bin/eventhandler_win.cc
|
| +++ b/runtime/bin/eventhandler_win.cc
|
| @@ -344,8 +344,10 @@ static void HandleError(Handle* handle) {
|
| handle->set_last_error(WSAGetLastError());
|
| handle->MarkError();
|
| if (!handle->IsClosing()) {
|
| - int event_mask = 1 << kErrorEvent;
|
| - DartUtils::PostInt32(handle->port(), event_mask);
|
| + Dart_Port port = handle->port();
|
| + if (port != ILLEGAL_PORT) {
|
| + DartUtils::PostInt32(port, 1 << kErrorEvent);
|
| + }
|
| }
|
| }
|
|
|
|
|