diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-11-01 01:32:40 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-11-01 01:32:40 +0000 |
| commit | e582a3e26b29c7e8a3a25bea843fc1f9f64d3370 (patch) | |
| tree | 793140cb7bc8ac77c935f96babdb87b307acee4a | |
| parent | 037fd7bf94f856359012c70aa8b5783d2a8c5aab (diff) | |
Calling Fl_Text_Display::buffer() with the same buffer would
cause an application to lockup (STR #196)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -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) diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index b37c8f5fc..aec0a1f4d 100644 --- a/src/Fl_Text_Display.cxx +++ b/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 @@ -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 ); @@ -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 $". // |
