From 1698cf9c2d7bd989667af69ad9f4a0fa506c59b6 Mon Sep 17 00:00:00 2001 From: Nils <> Date: Sun, 5 Jul 2020 12:53:15 +0200 Subject: [PATCH] Protect all input dialog windows against empty strings --- src/legacy-gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/legacy-gui.cpp b/src/legacy-gui.cpp index fbbc8f8..159ab48 100644 --- a/src/legacy-gui.cpp +++ b/src/legacy-gui.cpp @@ -590,7 +590,7 @@ public: { const char *name = fl_input( "Open Session", NULL ); - if ( ! name ) + if ( ! name || name[0] == '\0' ) return; Fl_Tree_Item *item = session_browser->find_item( name ); @@ -602,7 +602,7 @@ public: { const char *name = fl_input( "New Session", NULL ); - if ( ! name ) + if ( ! name || name[0] == '\0' ) return; MESSAGE( "Sending duplicate for: %s", name ); @@ -650,7 +650,7 @@ public: { const char *name = fl_input( "New Session", NULL ); - if ( !name ) + if ( ! name || name[0] == '\0' ) return; MESSAGE( "Sending new for: %s", name ); @@ -699,7 +699,7 @@ public: const char *n = fl_input( "Enter executable name" ); - if ( !n || !*n ) + if ( !n || !*n || n[0] == '\0' ) return; char *name = strdup( n ); @@ -722,7 +722,7 @@ public: { const char *n = fl_input( "Enter executable name" ); - if ( !n || !*n ) + if ( !n || !*n || n[0] == '\0' ) return; char *name = strdup( n );