This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] fix srctextwin warning


I checked this in as an obvious fix.  

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

2002-01-11  Martin M. Hunt  <hunt@redhat.com>

	* library/srctextwin.itb: Check for existence of $twin.

Index: library/srctextwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v
retrieving revision 1.29
diff -u -p -r1.29 srctextwin.itb
--- srctextwin.itb	2002/01/03 21:13:03	1.29
+++ srctextwin.itb	2002/01/11 23:24:00
@@ -349,19 +349,19 @@ body SrcTextWin::enable {on} {
     set status disabled
   }
 
-  bind $twin <B1-Motion> $bnd
-  bind $twin <Double-1> $bnd
-  bind $twin <Triple-1> $bnd
-  enable_disable_src_tags $twin $status
+  if {[winfo exists $twin]} {
+    bind $twin <B1-Motion> $bnd
+    bind $twin <Double-1> $bnd
+    bind $twin <Triple-1> $bnd
+    enable_disable_src_tags $twin $status
+    $twin configure -cursor $glyph
+  }
+
   if {$bwin != ""} {
     bind $bwin <B1-Motion> $bnd
     bind $bwin <Double-1> $bnd
     bind $bwin <Triple-1> $bnd
     enable_disable_src_tags $bwin $status
-  }
-
-  $twin configure -cursor $glyph
-  if {$bwin != ""} {
     $bwin configure -cursor $glyph
   }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]