summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pdf/draw_utils.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf/draw_utils.cc b/pdf/draw_utils.cc
index 0976de9..8bc3ac3 100644
--- a/pdf/draw_utils.cc
+++ b/pdf/draw_utils.cc
@@ -146,7 +146,9 @@ void CopyImage(const pp::ImageData& src, const pp::Rect& src_rc,
pp::ImageData* dest, const pp::Rect& dest_rc,
bool stretch) {
DCHECK(src_rc.width() <= dest_rc.width() &&
- src_rc.height() <= dest_rc.height());
+ src_rc.height() <= dest_rc.height());
+ if (src_rc.IsEmpty())
+ return;
const uint32_t* src_origin_pixel = src.GetAddr32(src_rc.point());
uint32_t* dest_origin_pixel = dest->GetAddr32(dest_rc.point());