diff --git a/src/kits/interface/PrivateScreen.cpp b/src/kits/interface/PrivateScreen.cpp index 7207d58ee6..fa50198aba 100644 --- a/src/kits/interface/PrivateScreen.cpp +++ b/src/kits/interface/PrivateScreen.cpp @@ -267,7 +267,12 @@ BPrivateScreen::GetMode(uint32 workspace, display_mode *mode) link.StartMessage(AS_SCREEN_GET_MODE); link.Attach(ID()); link.Attach(workspace); - link.Flush(); + + int32 code = SERVER_FALSE; + link.FlushWithReply(&code); + + if (code != SERVER_TRUE) + return B_ERROR; display_mode currentMode; link.Read(¤tMode);