Web API: fixed segfault on device and channel GETs

This commit is contained in:
f4exb 2017-12-28 10:58:50 +01:00
parent 0dd36d4f3e
commit 8ecc209934
1 changed files with 2 additions and 0 deletions

View File

@ -1515,6 +1515,7 @@ void WebAPIRequestMapper::appendSettingsSubKeys(
void WebAPIRequestMapper::resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& deviceSettings)
{
deviceSettings.cleanup();
deviceSettings.setDeviceHwType(0);
deviceSettings.setFileSourceSettings(0);
deviceSettings.setRtlSdrSettings(0);
deviceSettings.setLimeSdrInputSettings(0);
@ -1524,6 +1525,7 @@ void WebAPIRequestMapper::resetDeviceSettings(SWGSDRangel::SWGDeviceSettings& de
void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings)
{
channelSettings.cleanup();
channelSettings.setChannelType(0);
channelSettings.setNfmDemodSettings(0);
channelSettings.setNfmModSettings(0);
}