summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/cfx_renderdevice.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index c63f2f5ec3..16d723721f 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -632,21 +632,24 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData,
bbox = pObject2Device->TransformRect(bbox);
FX_RECT rect = bbox.GetOuterRect();
+ if (!rect.Valid())
+ return false;
+
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
- auto Backdrop = pdfium::MakeRetain<CFX_DIBitmap>();
+ auto backdrop = pdfium::MakeRetain<CFX_DIBitmap>();
if (!CreateCompatibleBitmap(bitmap, rect.Width(), rect.Height()))
return false;
if (bitmap->HasAlpha()) {
bitmap->Clear(0);
- Backdrop->Copy(bitmap);
+ backdrop->Copy(bitmap);
} else {
if (!m_pDeviceDriver->GetDIBits(bitmap, rect.left, rect.top))
return false;
- Backdrop->Copy(bitmap);
+ backdrop->Copy(bitmap);
}
CFX_DefaultRenderDevice bitmap_device;
- bitmap_device.Attach(bitmap, false, Backdrop, true);
+ bitmap_device.Attach(bitmap, false, backdrop, true);
CFX_Matrix matrix;
if (pObject2Device)