From 784d666a8e0c4afae45f18b68cdac7734962520c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 17:56:12 +0200 Subject: decoder_control: add assertion to dc_get_error() --- src/decoder_control.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decoder_control.h b/src/decoder_control.h index 164875ae0..743c8fb58 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -207,6 +207,7 @@ dc_get_error(const struct decoder_control *dc) { assert(dc != NULL); assert(dc->command == DECODE_COMMAND_NONE); + assert(dc->state != DECODE_STATE_ERROR || dc->error != NULL); return dc->state == DECODE_STATE_ERROR ? g_error_copy(dc->error) -- cgit v1.2.3