df-bug: avoid referencing null channel->owner

If dualopend dies, we shouldn't reference it
This commit is contained in:
niftynei 2021-05-10 18:53:41 -05:00 committed by Rusty Russell
parent 5ee4c9e46c
commit 4432672300

View File

@ -62,7 +62,10 @@ static void channel_disconnect(struct channel *channel,
if (reconnect)
channel_fail_reconnect(channel, "%s: %s",
channel->owner->name, desc);
channel->owner ?
channel->owner->name :
"dualopend-dead",
desc);
else
channel_set_owner(channel, NULL);
}