]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Do not "hide" Mic input widgets if they do not exist
authorc vw <dl1ycf@darc.de>
Sun, 13 Sep 2020 14:37:59 +0000 (16:37 +0200)
committerc vw <dl1ycf@darc.de>
Sun, 13 Sep 2020 14:37:59 +0000 (16:37 +0200)
tx_menu.c

index af4c6085776b4b006fa6d5da323c8d92453b08c2..1bf9e90de5f1781357335157f4968fb909191ef1 100644 (file)
--- 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);
   }
 
 }