From: Andre Noll Date: Thu, 12 Apr 2012 04:21:56 +0000 (+0200) Subject: i9e_attach_to_stdout(): Don't insist on btrn == NULL. X-Git-Tag: v0.4.12~7^2~21 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b56199aab3056d397697ac0c510d4e973c240d7d;ds=sidebyside i9e_attach_to_stdout(): Don't insist on btrn == NULL. This allows to call this function even if the stdout buffer tree node is already attached. In this case i9e_attach_to_stdout() detaches the current btr node first. --- diff --git a/interactive.c b/interactive.c index 27763eb3..f2e4a355 100644 --- a/interactive.c +++ b/interactive.c @@ -178,7 +178,7 @@ static char **i9e_completer(const char *text, int start, __a_unused int end) */ void i9e_attach_to_stdout(struct btr_node *producer) { - assert(!i9ep->stdout_btrn); + btr_remove_node(&i9ep->stdout_btrn); i9ep->stdout_btrn = btr_new_node(&(struct btr_node_description) EMBRACE(.name = "interactive_stdout", .parent = producer)); }