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-Tag: pulseview-0.2.0~257 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=52292f6c59053cbaf8c3b2d9a88cca496d2e10b3;p=pulseview.git 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 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;