rezaali / ofxUI

[DEPRECATED] UI Addon for openFrameworks
http://www.syedrezaali.com/#/ofxui-project-showcase/
518 stars 202 forks source link

ofxUINumberDialer attempts to use NULL font and segfaults #258

Open mitchmindtree opened 8 years ago

mitchmindtree commented 8 years ago

ofxUINumberDialer's inherited font field never seems to be set to a valid ofxUIFont until it is added to a parent ofxUICanvas.

This causes ofxNumberDialer to segfault when doing anything that requires constructing the text bounding box for its label (i.e. during positioning or layout) if it hasn't yet got a parent.

This seems to make it impossible to use ofxNumberDialer as an embedded widget when building a custom widget.

Just posting this in case anyone else runs into any voodoo when constructing ofxNumberDialer without immediately adding it to a parent canvas.

Ran into this while working with @JoshuaBatty on his UI.