diff --git a/src/servers/app/drawing/interface/remote/RemoteHWInterface.cpp b/src/servers/app/drawing/interface/remote/RemoteHWInterface.cpp index 467091562b..127d98cf09 100644 --- a/src/servers/app/drawing/interface/remote/RemoteHWInterface.cpp +++ b/src/servers/app/drawing/interface/remote/RemoteHWInterface.cpp @@ -228,7 +228,7 @@ RemoteHWInterface::_EventThreadEntry(void* data) status_t RemoteHWInterface::_EventThread() { - RemoteMessage message(fReceiveBuffer, fSendBuffer); + RemoteMessage message(fReceiveBuffer, NULL); while (true) { uint16 code; status_t result = message.NextMessage(code); diff --git a/src/servers/app/drawing/interface/remote/RemoteMessage.h b/src/servers/app/drawing/interface/remote/RemoteMessage.h index 3e17a1b6c3..228adc0262 100644 --- a/src/servers/app/drawing/interface/remote/RemoteMessage.h +++ b/src/servers/app/drawing/interface/remote/RemoteMessage.h @@ -239,7 +239,7 @@ RemoteMessage::Start(uint16 code) inline status_t RemoteMessage::Flush() { - if (fWriteIndex == 0) + if (fWriteIndex == 0 || fTarget == NULL) return B_NO_INIT; uint32 length = fWriteIndex; @@ -304,6 +304,9 @@ RemoteMessage::Read(T& value) if (fDataLeft < sizeof(T)) return B_ERROR; + if (fSource == NULL) + return B_NO_INIT; + int32 readSize = fSource->Read(&value, sizeof(T)); if (readSize < 0) return readSize;