Button doesn't cope with NULL font
Status: Beta
Brought to you by:
ant512
Although you can supposedly pass NULL for the font pointer, and rely on the system populating it (at addGadget() time), the constructor for Button expects it to be valid, because it calls Button::calculateTextPosition()
It should at least protect against dereferencing the null pointer - in fact, I'm not sure why it didn't crash completely (though I only tried it in DesMume)
Logged In: YES
user_id=1910533
Originator: NO
DeSMuMe is a swine when trying to debug - it almost never falls over when it hits a null pointer. No$GBA and real hardware will crash, though.
Logged In: YES
user_id=1910533
Originator: NO
Fixed. I've implemented the static system font in Woopsi, and all gadgets now use that if no font is passed n. All font parameters in gadget constructors are now optional. I've had to remove the inheritance idea as it proved unworkable without a little extra work, which really seems superfluous considering the ease with which a new gadget can be added using the parent gadget's font.