FLTK logo

STR #2835

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 chris
02:45 May 02, 2012
Fl_Widget_do_callback_check_for_null_callback_patch.txt
0k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.