Don't cache cells being measured in wxHtmlListBox.

This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().

Closes #16651.
This commit is contained in:
Vadim Zeitlin
2015-05-10 22:07:46 +02:00
parent a0157b37f2
commit 0a6b08cca3
3 changed files with 45 additions and 32 deletions

View File

@@ -148,6 +148,9 @@ private:
// returns index of item that contains given HTML cell
size_t GetItemForCell(const wxHtmlCell *cell) const;
// Create the cell for the given item, caller is responsible for freeing it.
wxHtmlCell* CreateCellForItem(size_t n) const;
// return physical coordinates of root wxHtmlCell of n-th item
wxPoint GetRootCellCoords(size_t n) const;