From 52292f6c59053cbaf8c3b2d9a88cca496d2e10b3 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Thu, 10 Oct 2013 18:07:20 +0100 Subject: [PATCH] Print an error message, rather than asserting if the srd_inst_new fails --- pv/data/decoder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pv/data/decoder.cpp b/pv/data/decoder.cpp index 00b9e0b7..2cfb3a99 100644 --- a/pv/data/decoder.cpp +++ b/pv/data/decoder.cpp @@ -116,7 +116,10 @@ void Decoder::init_decoder() } _decoder_inst = srd_inst_new(_decoder->id, _options); - assert(_decoder_inst); + if(!_decoder_inst) { + qDebug() << "Failed to initialise decoder"; + return; + } _decoder_inst->data_samplerate = _samplerate; -- 2.30.2