summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-11-01 01:32:40 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-11-01 01:32:40 +0000
commite582a3e26b29c7e8a3a25bea843fc1f9f64d3370 (patch)
tree793140cb7bc8ac77c935f96babdb87b307acee4a /src
parent037fd7bf94f856359012c70aa8b5783d2a8c5aab (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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Display.cxx5
1 files changed, 3 insertions, 2 deletions
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 $".
//