diff options
author | thestig <thestig@chromium.org> | 2016-10-13 13:33:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-13 13:33:03 -0700 |
commit | 36bad2b022014ea7161fe888fec1191d2ba6b894 (patch) | |
tree | f3451d8d795d7e5f63330ebfaee3fa2b89fbc15f /xfa/fxfa/app | |
parent | a282c7380f3964de41ea93c9980b12c4513d3473 (diff) | |
download | pdfium-36bad2b022014ea7161fe888fec1191d2ba6b894.tar.xz |
Fix nullptr crash inXFA_FFBarcode::UpdateWidgetProperty().
BUG=chromium:655455
Review-Url: https://codereview.chromium.org/2421633002
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_ffbarcode.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index 728a701c1f..4bb3ba0a4d 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -161,12 +161,16 @@ void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, mt.Concat(mtRotate); m_pNormalWidget->DrawWidget(pGS, &mt); } + void CXFA_FFBarcode::UpdateWidgetProperty() { CXFA_FFTextEdit::UpdateWidgetProperty(); CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; CFX_WideString wsType = GetDataAcc()->GetBarcodeType(); XFA_LPCBARCODETYPEENUMINFO pBarcodeTypeInfo = XFA_GetBarcodeTypeByName(wsType.AsStringC()); + if (!pBarcodeTypeInfo) + return; + pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType); CXFA_WidgetAcc* pAcc = GetDataAcc(); int32_t intVal; @@ -216,6 +220,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() { pBarCodeWidget->SetPrintChecksum(TRUE); } } + FX_BOOL CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |