Null Pointers manipulation
Easy-to-use print report library and designer
Brought to you by:
aliks-os
Hey Alik,
Testing your new version. It is a great feature to control reports at runtime, but there are some bugs all over the code where you assume that MasterHeader and MasterFooter for instance are always present on a page, and you manipulate a possible null pointer and crashes the app.
For instance lines 1193 and 1253 for MasterHeader. You must check for nullpointer always :) Like:
RptBandObject *bandObj = pageList.at(pageReport)->getBand(MasterHeader);
if ((bandObj != NULL) && (bandObj->showInGroup == 0))
...
Regards!
Yes you are right, corrected
Alik,
I checked the SVN, all over the code when you do getBand() you should not manipulate the pointer directly before checking for null.
There are lots of possibilities to crash in this version.
I found two more that caused problems in my reports, on function prcessGroupHeader, at the end of it should be:
I believe you should go through all getBand() calls and be sure that there is not a possibility of a null pointer.
Regards!
My bad, the code should be:
Added, thankyou