kopia lustrzana https://github.com/f4exb/sdrangel
Prevent crash that can occur if preset type is unknown.
rodzic
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();
|
||||||
|
}
|
||||||
|
|
||||||
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_deviceGUI, deviceSetPreset.getDeviceGeometry());
|
if (m_deviceUIs.size() > 0)
|
||||||
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_mainSpectrumGUI, deviceSetPreset.getSpectrumGeometry());
|
{
|
||||||
m_deviceUIs.back()->loadDeviceSetSettings(&deviceSetPreset, m_pluginManager->getPluginAPI(), &m_workspaces, nullptr);
|
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_deviceGUI, deviceSetPreset.getDeviceGeometry());
|
||||||
|
MDIUtils::restoreMDIGeometry(m_deviceUIs.back()->m_mainSpectrumGUI, deviceSetPreset.getSpectrumGeometry());
|
||||||
|
m_deviceUIs.back()->loadDeviceSetSettings(&deviceSetPreset, m_pluginManager->getPluginAPI(), &m_workspaces, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
if (waitBox)
|
if (waitBox)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue