This can happen if either the saved configuration is wrong
or a decoder simply doesn't exist. We don't want to crash then.
#ifdef ENABLE_DECODE
bool Session::add_decoder(srd_decoder *const dec)
{
#ifdef ENABLE_DECODE
bool Session::add_decoder(srd_decoder *const dec)
{
+ if (!dec)
+ return false;
+
map<const srd_channel*, shared_ptr<data::SignalBase> > channels;
shared_ptr<data::DecoderStack> decoder_stack;
map<const srd_channel*, shared_ptr<data::SignalBase> > channels;
shared_ptr<data::DecoderStack> decoder_stack;