From: marko Date: Fri, 5 Aug 2005 15:11:10 +0000 (+0000) Subject: Bugfix: applying an empty custom-config would lead to a deadlock in GUI. X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=f6cf0d34afa73ecb451e1d586865ab7e699e2c2d;p=imunes.git Bugfix: applying an empty custom-config would lead to a deadlock in GUI. Bugfix: correctly implement removeCanvas procedure. Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- diff --git a/canvas.tcl b/canvas.tcl index 0bb61d8..802e592 100755 --- a/canvas.tcl +++ b/canvas.tcl @@ -32,7 +32,11 @@ proc removeCanvas { canvas } { - #puts "removeCanvas $canvas" + global canvass $canvas + + set i [lsearch $canvass $canvas] + set canvass [lreplace $canvass $i $i] + set $canvas {} return } @@ -43,5 +47,6 @@ proc newCanvas { name } { set canvas c0 global $canvas lappend canvass $canvas - set $canvas {{name default}} + set $canvas {name default} + return } diff --git a/editor.tcl b/editor.tcl index 0662067..ab6f3ae 100755 --- a/editor.tcl +++ b/editor.tcl @@ -1316,7 +1316,7 @@ proc customConfigApply { w node } { set newcmd [$w.ftop.cmd get] set newconf [split [$w.text get 0.0 end] { }] - while { [lindex $newconf end] == {} } { + while { [lindex $newconf end] == {} && $newconf != {} } { set newconf [lreplace $newconf end end] } if { [getCustomCmd $node] != $newcmd || \