From: c vw Date: Sun, 13 Sep 2020 14:37:59 +0000 (+0200) Subject: Do not "hide" Mic input widgets if they do not exist X-Git-Url: https://git.rkrishnan.org/simplejson/components/-?a=commitdiff_plain;h=3c671ca336ae3515df8328e45e2703b889c40a58;p=pihpsdr.git Do not "hide" Mic input widgets if they do not exist --- diff --git a/tx_menu.c b/tx_menu.c index af4c608..1bf9e90 100644 --- a/tx_menu.c +++ b/tx_menu.c @@ -570,9 +570,10 @@ void tx_menu(GtkWidget *parent) { if(transmitter->local_microphone && (protocol==ORIGINAL_PROTOCOL || protocol==NEW_PROTOCOL)) { - gtk_widget_hide(micin_b); - gtk_widget_hide(linein_b); - gtk_widget_hide(micboost_b); + // If device has no microphone input, these widgest may not exist + if (micbin_b != NULL) gtk_widget_hide(micin_b); + if (linein_b != NULL) gtk_widget_hide(linein_b); + if (micboost_b != NULL) gtk_widget_hide(micboost_b); } }