summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-10 14:36:05 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-10 14:36:05 -0800
commitad928700bf2dac99148b12f0848fcfab6746ce26 (patch)
tree2c693c3b2c5ed40e647977ca672fed186fcd3226 /xfa/src/fxfa
parent07cafd7e570920810b1589ca30db0a7057b9b6ac (diff)
downloadpdfium-ad928700bf2dac99148b12f0848fcfab6746ce26.tar.xz
Fix invalid cast in CXFA_FFNotify::OnLayoutItemRemoving().
There's a re-interpretation followed by a pointer-adjusting static cast required here, not just a blatant re-interpretation. BUG=pdfium:271 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1431313005 .
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
index 24b72f8e23..aff2b40d3a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
@@ -605,7 +605,8 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView,
CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2) {
- CXFA_FFWidget* pWidget = (CXFA_FFWidget*)pSender;
+ CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(
+ reinterpret_cast<CXFA_ContentLayoutItemImpl*>(pSender));
pDocView->DeleteLayoutItem(pWidget);
if (pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End) {
return;