]> sigrok.org Git - pulseview.git/commitdiff
Print an error message, rather than asserting if the srd_inst_new fails
authorJoel Holdsworth <redacted>
Thu, 10 Oct 2013 17:07:20 +0000 (18:07 +0100)
committerJoel Holdsworth <redacted>
Sun, 13 Oct 2013 11:39:38 +0000 (12:39 +0100)
pv/data/decoder.cpp

index 00b9e0b7efb0b87b3d508828922707e46f73f5e6..2cfb3a99a9b289f49103718a7169301d66ceb198 100644 (file)
@@ -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;