mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-26 14:05:33 -04:00
Prevent crash that can occur if preset type is unknown.
This commit is contained in:
parent
d989561df5
commit
b16206068a
@ -1502,10 +1502,17 @@ void MainWindow::loadConfiguration(const Configuration *configuration, bool from
|
|||||||
deviceWorkspaceIndex;
|
deviceWorkspaceIndex;
|
||||||
sampleMIMOAdd(m_workspaces[deviceWorkspaceIndex], m_workspaces[spectrumWorkspaceIndex], bestDeviceIndex);
|
sampleMIMOAdd(m_workspaces[deviceWorkspaceIndex], m_workspaces[spectrumWorkspaceIndex], bestDeviceIndex);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug() << "MainWindow::loadConfiguration: Unknown preset type: " << deviceSetPreset.getPresetType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_deviceUIs.size() > 0)
|
||||||
|
{
|
||||||
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_deviceGUI, deviceSetPreset.getDeviceGeometry());
|
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_deviceGUI, deviceSetPreset.getDeviceGeometry());
|
||||||
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_mainSpectrumGUI, deviceSetPreset.getSpectrumGeometry());
|
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_mainSpectrumGUI, deviceSetPreset.getSpectrumGeometry());
|
||||||
m_deviceUIs.back()->loadDeviceSetSettings(&deviceSetPreset, m_pluginManager->getPluginAPI(), &m_workspaces, nullptr);
|
m_deviceUIs.back()->loadDeviceSetSettings(&deviceSetPreset, m_pluginManager->getPluginAPI(), &m_workspaces, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
if (waitBox)
|
if (waitBox)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user