protocol-native: avoid NULL pointer access

This commit is contained in:
Wim Taymans 2019-08-16 15:09:16 +02:00
parent aa2e2f192b
commit 8da7222c7e

View file

@ -534,14 +534,14 @@ on_remote_data(void *data, int fd, uint32_t mask)
proxy = pw_remote_find_proxy(this, msg->id); proxy = pw_remote_find_proxy(this, msg->id);
if (proxy == NULL || proxy->zombie) { if (proxy == NULL || proxy->zombie) {
if (proxy->zombie) if (proxy == NULL)
pw_log_debug(NAME" %p: zombie proxy %u", this, msg->id);
else
pw_log_error(NAME" %p: could not find proxy %u", this, msg->id); pw_log_error(NAME" %p: could not find proxy %u", this, msg->id);
else
pw_log_debug(NAME" %p: zombie proxy %u", this, msg->id);
/* FIXME close fds */ /* FIXME close fds */
continue; continue;
} }
marshal = pw_proxy_get_marshal(proxy); marshal = pw_proxy_get_marshal(proxy);
if (marshal == NULL || msg->opcode >= marshal->n_events) { if (marshal == NULL || msg->opcode >= marshal->n_events) {