summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_cliprgn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/ge/cfx_cliprgn.cpp')
-rw-r--r--core/fxge/ge/cfx_cliprgn.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fxge/ge/cfx_cliprgn.cpp b/core/fxge/ge/cfx_cliprgn.cpp
index 41975e4b84..ba2605aeca 100644
--- a/core/fxge/ge/cfx_cliprgn.cpp
+++ b/core/fxge/ge/cfx_cliprgn.cpp
@@ -49,9 +49,7 @@ void CFX_ClipRgn::IntersectMaskRect(FX_RECT rect,
m_Mask = Mask;
return;
}
- CFX_DIBitmap* new_dib = m_Mask.New();
- if (!new_dib)
- return;
+ CFX_DIBitmap* new_dib = m_Mask.Emplace();
new_dib->Create(m_Box.Width(), m_Box.Height(), FXDIB_8bppMask);
for (int row = m_Box.top; row < m_Box.bottom; row++) {
uint8_t* dest_scan =
@@ -82,9 +80,7 @@ void CFX_ClipRgn::IntersectMaskF(int left, int top, CFX_DIBitmapRef Mask) {
return;
}
CFX_DIBitmapRef new_mask;
- CFX_DIBitmap* new_dib = new_mask.New();
- if (!new_dib)
- return;
+ CFX_DIBitmap* new_dib = new_mask.Emplace();
new_dib->Create(new_box.Width(), new_box.Height(), FXDIB_8bppMask);
const CFX_DIBitmap* old_dib = m_Mask.GetObject();
for (int row = new_box.top; row < new_box.bottom; row++) {