summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_image.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 5f82886a9b..24f58dfeff 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -351,7 +351,7 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
int ret = source->StartLoadDIBSource(m_pDocument.Get(), m_pStream.Get(), true,
pFormResource, pPageResource, bStdCS,
GroupFamily, bLoadMask);
- if (!ret) {
+ if (ret == 0) {
m_pDIBSource.Reset();
return false;
}
@@ -367,14 +367,14 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
bool CPDF_Image::Continue(IFX_PauseIndicator* pPause) {
RetainPtr<CPDF_DIBSource> pSource = m_pDIBSource.As<CPDF_DIBSource>();
int ret = pSource->ContinueLoadDIBSource(pPause);
- if (!ret) {
- m_pDIBSource.Reset();
- return false;
- }
if (ret == 2)
return true;
- m_pMask = pSource->DetachMask();
- m_MatteColor = pSource->GetMatteColor();
+ if (ret == 1) {
+ m_pMask = pSource->DetachMask();
+ m_MatteColor = pSource->GetMatteColor();
+ } else {
+ m_pDIBSource.Reset();
+ }
return false;
}