We had this code in:
fl_BlockLayout * pBL = ... some code
fl_BlockLayout * pPrevBL =
static_cast<fl_BlockLayout*>(pBL->getPrev());
pPrevBL->blockSpecificMemberFunction();
In this particular case pointer to fl_TableLayout was cast to
fl_BlockLayout*. I found (and fixed) numerous other occasions of this
construct in the same file; I think pretty much all of that code was
left over from the days fl_BlockLayout was the only container layout -
- I am surprised we did not crash before; also added couple of
asserts where I thought we had a dubious static cast but was not
sure.
I think this should be backported if possible.
file: fl_BlockLayout.cpp
Tomas
Received on Thu Sep 16 17:11:15 2004
This archive was generated by hypermail 2.1.8 : Thu Sep 16 2004 - 17:11:15 CEST