Avoid one more instance of the anti-pattern in 706346.

Need to have a function taking a const CFX_RetainPtr<X>& reference
as an argument, assign a different object to a m_ variable of the same
type in the function, continue to use the reference after the assignment,
and call the function elsewhere with the same m_ variable as the argument
while having no other RetainPtrs to the object.

Unclear if it is called in this manner, but the first three points
hold, so be proactive.

Change-Id: I0ece4d7da0b8cf5f3079c53fa612ca07e9632502
Reviewed-on: https://pdfium-review.googlesource.com/3377
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp
index 8a97d34..32b7c0b 100644
--- a/core/fxge/dib/fx_dib_main.cpp
+++ b/core/fxge/dib/fx_dib_main.cpp
@@ -1400,14 +1400,15 @@
 
 CFX_DIBExtractor::CFX_DIBExtractor(const CFX_RetainPtr<CFX_DIBSource>& pSrc) {
   if (pSrc->GetBuffer()) {
+    CFX_RetainPtr<CFX_DIBSource> pOldSrc(pSrc);
     m_pBitmap = pdfium::MakeRetain<CFX_DIBitmap>();
-    if (!m_pBitmap->Create(pSrc->GetWidth(), pSrc->GetHeight(),
-                           pSrc->GetFormat(), pSrc->GetBuffer())) {
+    if (!m_pBitmap->Create(pOldSrc->GetWidth(), pOldSrc->GetHeight(),
+                           pOldSrc->GetFormat(), pOldSrc->GetBuffer())) {
       m_pBitmap.Reset();
       return;
     }
-    m_pBitmap->SetPalette(pSrc->GetPalette());
-    m_pBitmap->SetAlphaMask(pSrc->m_pAlphaMask);
+    m_pBitmap->SetPalette(pOldSrc->GetPalette());
+    m_pBitmap->SetAlphaMask(pOldSrc->m_pAlphaMask);
   } else {
     m_pBitmap = pSrc->Clone();
   }