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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user