--- a/lib/App/ClusterSSH.pm
+++ b/lib/App/ClusterSSH.pm
@@ -1499,7 +1499,7 @@
             resolve_names( split( /\s+/, $menus{host_entry} ) ) );
     }
 
-    if ( $menus{listbox}->curselection() ) {
+    if ( defined $menus{listbox} && $menus{listbox}->curselection() ) {
         my @hosts = $menus{listbox}->get( $menus{listbox}->curselection() );
         logmsg( 2, "host=", join( ' ', @hosts ) );
         open_client_windows( resolve_names(@hosts) );
