Steffen Mueller wrote:
Hi,
the ToolBar::AddTool XS code doesn't check whether it's being passed a
Wx::Bitmap at all. If you pass undef for the bitmap, you get a friendly
segmentation fault.
General question: Is this kind of not checking the parameters on purpose
(i.e "whoever uses this should know what she's doing") or is it a bug?
Having proper NULL check would require two separate typemaps
for each type (say, wxBitmap* and wxBitmap_not_null*) and applying
them consistently with wxWidgets documentation of which parameters can
or can't be NULL. To be honest I never felt it necessary, but would not
say no to a patch implementing it.
Regards,
Mattia