Skip to content

Commit

Permalink
Fl_Widget::copy_label(NULL) didn't work (STR #707)
Browse files Browse the repository at this point in the history
src/Fl_Widget.cxx:
    - Check for NULL in Fl_Widget::copy_label()


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Feb 6, 2005
1 parent 9290da7 commit b32fefd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES
@@ -1,6 +1,9 @@
CHANGES IN FLTK 1.1.7

- Documentation fixes (STR #648, STR #692)
- Fl_Widget::copy_label(NULL) didn't work (STR #707)
- Fl_Choice now allows click selection like
Fl_Menu_Button and Fl_Menubar (STR #706)
- Updated cmake support (STR #645)
- Fl_Check_Browser didn't draw properly when inactive
(STR #681)
Expand Down
13 changes: 9 additions & 4 deletions src/Fl_Widget.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.26 2004/11/23 19:51:03 easysw Exp $"
// "$Id$"
//
// Base widget class for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -262,12 +262,17 @@ Fl_Widget::label(const char *a) {
void
Fl_Widget::copy_label(const char *a) {
if (flags() & COPIED_LABEL) free((void *)(label_.value));
set_flag(COPIED_LABEL);
label_.value=strdup(a);
if (a) {
set_flag(COPIED_LABEL);
label_.value=strdup(a);
} else {
clear_flag(COPIED_LABEL);
label_.value=(char *)0;
}
redraw_label();
}


//
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.26 2004/11/23 19:51:03 easysw Exp $".
// End of "$Id$".
//

0 comments on commit b32fefd

Please sign in to comment.