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 { |