mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-05 00:41:17 -05:00
Prevent crash from disabling AGC before device is known
This commit is contained in:
parent
798c558c09
commit
388d948486
@ -508,6 +508,10 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
|
||||
wxGetApp().saveConfig();
|
||||
iqSwapMenuItem->Check(swap_state);
|
||||
} else if (event.GetId() == wxID_AGC_CONTROL) {
|
||||
if (wxGetApp().getDevice() == NULL) {
|
||||
agcMenuItem->Check();
|
||||
return;
|
||||
}
|
||||
if (!wxGetApp().getAGCMode()) {
|
||||
wxGetApp().setAGCMode(true);
|
||||
gainSpacerItem->Show(false);
|
||||
|
Loading…
Reference in New Issue
Block a user