1. Stefan Saasen
  2. git

Commits

Shawn O. Pearce  committed 580b73d

git-gui: Fix bind errors when switching repository chooser panels

We need to remove any variable traces we may have installed
when the panel is destroyed as the trace may attempt to use
a widget that no longer exists on this panel.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

  • Participants
  • Parent commits 9c1b1b1
  • Branches master

Comments (0)

Files changed (1)

File lib/choose_repository.tcl

View file
 	pack $w_body.where -fill x
 
 	trace add variable @local_path write [cb _write_local_path]
+	bind $w_body.h <Destroy> [list trace remove variable @local_path write [cb _write_local_path]]
 	update
 	focus $w_body.where.t
 }
 
 	trace add variable @local_path write [cb _update_clone]
 	trace add variable @origin_url write [cb _update_clone]
+	bind $w_body.h <Destroy> "
+		[list trace remove variable @local_path write [cb _update_clone]]
+		[list trace remove variable @origin_url write [cb _update_clone]]
+	"
 	update
 	focus $args.origin_t
 }
 	pack $w_body.where -fill x
 
 	trace add variable @local_path write [cb _write_local_path]
+	bind $w_body.h <Destroy> [list trace remove variable @local_path write [cb _write_local_path]]
 	update
 	focus $w_body.where.t
 }