summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/outdev/gradient.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 3ba80a0cdc2b..1250654d372d 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -441,8 +441,8 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
bool OutputDevice::is_double_buffered_window() const
{
- const vcl::Window *pWindow = dynamic_cast<const vcl::Window*>(this);
- return pWindow && pWindow->SupportsDoubleBuffering();
+ auto pOwnerWindow = GetOwnerWindow();
+ return pOwnerWindow && pOwnerWindow->SupportsDoubleBuffering();
}
void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,