Commit 784d666a authored by Max Kellermann's avatar Max Kellermann

decoder_control: add assertion to dc_get_error()

parent c035910d
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment