diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-03-08 20:41:59 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-08 20:41:59 +0000 |
commit | 5a7e330ef5e013e5df5fe771d3901ff890aa9731 (patch) | |
tree | 6bbb05b2e00b30408a38a484ce87c3598fc3c865 /xfa | |
parent | a724cb2df9f7b766174ac578cd4d435596898cc1 (diff) | |
download | pdfium-5a7e330ef5e013e5df5fe771d3901ff890aa9731.tar.xz |
Unset timer in XFA scrollbar after stopping it.
This fixes a crash that happens after interacting with the scrollbar
a few times.
Bug: chromium:820210
Change-Id: I458337f21c9322351474a1574ab596c600dcbbbf
Reviewed-on: https://pdfium-review.googlesource.com/28290
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fwl/cfwl_scrollbar.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp index 26c367a831..1d22386c83 100644 --- a/xfa/fwl/cfwl_scrollbar.cpp +++ b/xfa/fwl/cfwl_scrollbar.cpp @@ -385,8 +385,11 @@ void CFWL_ScrollBar::OnLButtonDown(const CFX_PointF& point) { } void CFWL_ScrollBar::OnLButtonUp(const CFX_PointF& point) { - if (m_pTimerInfo) + if (m_pTimerInfo) { m_pTimerInfo->StopTimer(); + m_pTimerInfo = nullptr; + } + m_bMouseDown = false; DoMouseUp(0, m_rtMinBtn, m_iMinButtonState, point); DoMouseUp(1, m_rtThumb, m_iThumbButtonState, point); @@ -487,8 +490,10 @@ CFWL_ScrollBar::Timer::Timer(CFWL_ScrollBar* pToolTip) : CFWL_Timer(pToolTip) {} void CFWL_ScrollBar::Timer::Run(CFWL_TimerInfo* pTimerInfo) { CFWL_ScrollBar* pScrollBar = static_cast<CFWL_ScrollBar*>(m_pWidget.Get()); - if (pScrollBar->m_pTimerInfo) + if (pScrollBar->m_pTimerInfo) { pScrollBar->m_pTimerInfo->StopTimer(); + pScrollBar->m_pTimerInfo = nullptr; + } if (!pScrollBar->SendEvent()) pScrollBar->m_pTimerInfo = StartTimer(0, true); |