diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 11:03:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-10 11:35:14 +0200 |
commit | 12df0a2ac89cc8da216d2244aa52ca3c291ba93f (patch) | |
tree | 286c99bc48641f9bc7295d042389681e5c9832f1 /vcl/source/window/wrkwin.cxx | |
parent | 385ce0323fd6b5c13ab26414d68c6ca2afcfc97d (diff) |
fix OSX build
after my "WindowStateState scoped enum" conversion.
WorkWindow::IsMinimized needs to check the return code of
SalFrame::GetWindowState, or it can end up reading uninitialised memory.
So mark the member as SAL_WARN_UNUSED_RESULT.
Change-Id: Iaeb132ed2fbf08162dbd7ec2e126dfa679cbda6c
Diffstat (limited to 'vcl/source/window/wrkwin.cxx')
-rw-r--r-- | vcl/source/window/wrkwin.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 2ebe8d808b62..20470a00c4bc 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -208,8 +208,10 @@ bool WorkWindow::IsMinimized() const { //return mpWindowImpl->mpFrameData->mbMinimized; SalFrameState aState; - mpWindowImpl->mpFrame->GetWindowState(&aState); - return bool(aState.mnState & WindowStateState::Minimized); + if (mpWindowImpl->mpFrame->GetWindowState(&aState)) + return bool(aState.mnState & WindowStateState::Minimized); + else + return false; } bool WorkWindow::SetPluginParent( SystemParentData* pParent ) |