mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-31 23:26:22 +00:00
Avoid segmentation fault due to misconfiguration
This commit is contained in:
parent
96803c1d0f
commit
f076c6afd9
@ -118,6 +118,14 @@ void GNSSFlowgraph::init()
|
||||
int sources_count_deprecated = configuration_->property("Receiver.sources_count", 1);
|
||||
sources_count_ = configuration_->property("GNSS-SDR.num_sources", sources_count_deprecated);
|
||||
|
||||
// Avoid segmentation fault caused by wrong configuration
|
||||
if (sources_count_ == 2 && block_factory->GetSignalSource(configuration_.get(), queue_.get(), 0)->implementation() == "Multichannel_File_Signal_Source")
|
||||
{
|
||||
std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuraiion file\n";
|
||||
std::cout << " if you are using the Multichannel_File_Signal_Source implementation.\n";
|
||||
sources_count_ = 1;
|
||||
}
|
||||
|
||||
int signal_conditioner_ID = 0;
|
||||
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user