diff --git a/common/quic.c b/common/quic.c index e2dee0fd68741512911d5d050053ad073cf29457..bc753ca5064a0326906b4aa8c18d8745747feb5c 100644 --- a/subprojects/spice-common/common/quic.c +++ b/subprojects/spice-common/common/quic.c @@ -1136,7 +1136,7 @@ int quic_decode_begin(QuicContext *quic, uint32_t *io_ptr, unsigned int num_io_w int channels; int bpc; - if (!encoder_reset(encoder, io_ptr, io_ptr_end)) { + if (!num_io_words || !encoder_reset(encoder, io_ptr, io_ptr_end)) { return QUIC_ERROR; }