Skip to content

Commit

Permalink
Calling Fl_Text_Display::buffer() with the same buffer would
Browse files Browse the repository at this point in the history
cause an application to lockup (STR #196)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Nov 1, 2003
1 parent 037fd7b commit e582a3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.5rc1

- Calling Fl_Text_Display::buffer() with the same buffer
would cause an application to lockup (STR #196)
- Some of the widgets could crash an application if the
cursor was changed after a window was deleted (STR
#181)
Expand Down
5 changes: 3 additions & 2 deletions src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.47 2003/11/01 01:07:07 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.48 2003/11/01 01:32:40 easysw Exp $"
//
// Copyright 2001-2003 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
Expand Down Expand Up @@ -153,6 +153,7 @@ Fl_Text_Display::~Fl_Text_Display() {
void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) {
/* If the text display is already displaying a buffer, clear it off
of the display and remove our callback from it */
if ( buf == mBuffer) return;
if ( mBuffer != 0 ) {
buffer_modified_cb( 0, 0, mBuffer->length(), 0, 0, this );
mBuffer->remove_modify_callback( buffer_modified_cb, this );
Expand Down Expand Up @@ -3058,5 +3059,5 @@ int Fl_Text_Display::handle(int event) {


//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.47 2003/11/01 01:07:07 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.48 2003/11/01 01:32:40 easysw Exp $".
//

0 comments on commit e582a3e

Please sign in to comment.