From e4dc5d5a1f7127d9a4d6550d32f1570d5adcc4d3 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Sun, 13 Sep 2020 16:39:27 +0200
Subject: [PATCH] Do not hide non-existing widgets (e.g. on HermesLite2)

---
 tx_menu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tx_menu.c b/tx_menu.c
index b411e58..76edcc2 100644
--- a/tx_menu.c
+++ b/tx_menu.c
@@ -556,9 +556,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);
   }
 
 }
-- 
2.45.2