From: Max Kellermann Date: Sat, 25 Mar 2017 19:20:30 +0000 (+0100) Subject: aconnect: assign variable first, then start connect X-Git-Tag: v0.27~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=efade6294d7420ecd123d5641385c27c40794fca;p=ncmpc.git aconnect: assign variable first, then start connect Fixes bogus assertion failure. --- diff --git a/NEWS b/NEWS index 2e36c8a..6956a1e 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ncmpc 0.27 - not yet released * remove the status bar clock (option "display-time") +* fix assertion failure after connect failure ncmpc 0.26 - (2017-03-20) * require libmpdclient 2.9 diff --git a/src/aconnect.c b/src/aconnect.c index 345bc52..a0f7315 100644 --- a/src/aconnect.c +++ b/src/aconnect.c @@ -144,10 +144,10 @@ aconnect_start(struct aconnect **acp, ac->handler = handler; ac->handler_ctx = ctx; + *acp = ac; + async_rconnect_start(&ac->rconnect, host, port, &aconnect_rconnect_handler, ac); - - *acp = ac; } void