| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #2835
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fl_Widget::do_callback() should check callback_ for NULL |
Version: | 1.3-feature |
Created By: | chris |
Assigned To: | AlbrechtS |
Fix Version: | 1.3.4 (SVN: v11811) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | chris 02:45 May 02, 2012 |
| Programming intuitively I tried to disable a Widget callback temporarilly (during some update to a property that normally triggered a callback) by using
mywidget->callback( (Fl_Callback *)0 );
That crashes in Fl_Widget::do_callback(), because there is no check for callback_ != NULL.
Guess, I should have used Fl_Widget::default_callback for that purpose, but it's so intuitive - and so easy to fix.
Attached a one line patch for your consideration. | |
|
#2 | ianmacarthur 03:21 May 02, 2012 |
| This *seems* like a sensible sort of thing to do - I guess if it is null we could even explicitly call the default_callback...
I wonder why we didn't do this anyway...? | |
|
#3 | AlbrechtS 12:24 Jul 15, 2016 |
| Fixed in Subversion repository.
Thanks for the report and the patch. | |
[ Return to Bugs & Features ]
|
| |