Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Unified Diff: fpdfsdk/pdfwindow/PWL_ListBox.cpp

Issue 2160023002: Reset notify parameter in CPWL_ListBox OnDestroy(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/pdfwindow/PWL_ListBox.cpp
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index e8c1f82bdef31be056bfb0696547dd568dec9e56..1bdb1bb1e0bc5e2abc66e647a93ef9f045d5414b 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -73,6 +73,12 @@ CPWL_ListBox::CPWL_ListBox()
m_pFillerNotify(nullptr) {}
CPWL_ListBox::~CPWL_ListBox() {
+ // Remove the notifier from the list before we start destruction because
+ // CFX_ListCtrl will cause an invalidation on destruction. That invalidation
+ // will call into the m_pListNotify object, but, m_pListNotify may have
Lei Zhang 2016/07/18 22:22:07 |m_pListNotify|, no comma after "but"
dsinclair 2016/07/19 13:13:45 Done.
+ // already been destroyed.
+ if (m_pList)
Lei Zhang 2016/07/18 22:22:07 BTW, I think this always evals to true? Maybe for
dsinclair 2016/07/19 13:13:45 Possibly, have to check the child classes to see i
+ m_pList->SetNotify(nullptr);
Lei Zhang 2016/07/18 22:22:07 Should this be in OnDestroy() below to mirror the
dsinclair 2016/07/19 13:13:45 Done.
}
CFX_ByteString CPWL_ListBox::GetClassName() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698