mirror of https://github.com/mpv-player/mpv
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:
parent
a2cf846a5c
commit
fca64d913b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue