filter: fix potential NULL pointer deref

The rest of the function should be executed only if both are set. It
seems like in practice this didn't happen yet with only one of them
unset, but in theory it's possible. Found by Coverity.
This commit is contained in:
wm4 2018-02-14 23:19:26 +01:00 committed by Kevin Mitchell
parent a2cf846a5c
commit fca64d913b
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ static void init_connection(struct mp_pin *p)
// manual connections at the ends is still disconnected (or if this
// attempted to extend an existing connection, becomes dangling and gets
// disconnected).
if (!in->manual_connection && !out->manual_connection)
if (!in->manual_connection || !out->manual_connection)
return;
assert(in->dir == MP_PIN_IN);