From: Joel Holdsworth Date: Thu, 10 Oct 2013 17:07:20 +0000 (+0100) Subject: Print an error message, rather than asserting if the srd_inst_new fails X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=52292f6c59053cbaf8c3b2d9a88cca496d2e10b3 Print an error message, rather than asserting if the srd_inst_new fails --- diff --git a/pv/data/decoder.cpp b/pv/data/decoder.cpp index 00b9e0b..2cfb3a9 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;