From 2f3e136d1c5098a70656b3669547694de2d9a501 Mon Sep 17 00:00:00 2001 From: lenosisnickerboa Date: Sun, 31 Jan 2021 19:41:21 +0100 Subject: [PATCH] Added some more empty-mapgroup-checks --- src/config_page.tcl | 9 +++++++++ src/version.tcl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config_page.tcl b/src/config_page.tcl index a32da68..6c5763e 100755 --- a/src/config_page.tcl +++ b/src/config_page.tcl @@ -599,6 +599,9 @@ proc GetSelectedMaps {lbMaps} { } proc GetMapsFromSelectedMapGroup {mapGroup} { + if { "$mapGroup" == "" } { + return "" + } global mapGroupsMapper return [dict get $mapGroupsMapper $mapGroup] } @@ -794,8 +797,14 @@ proc ShowMapPreview {lbMaps} { proc ClickedMapsListBox {lbMapGroups lbMaps} { set selectedMapGroup [GetSelectedMapGroup $lbMapGroups] + if { "$selectedMapGroup" == "" } { + return + } set selectedMapGroupIx [$lbMapGroups curselection] set mapsFromSelectedMapGroup [GetMapsFromSelectedMapGroup $selectedMapGroup] + if { "$mapsFromSelectedMapGroup" == "" } { + return + } set selectedMaps [GetSelectedMaps $lbMaps] if { $mapsFromSelectedMapGroup != $selectedMaps } { $lbMapGroups itemconfigure $selectedMapGroupIx -selectbackground red diff --git a/src/version.tcl b/src/version.tcl index aab37ac..ecff064 100755 --- a/src/version.tcl +++ b/src/version.tcl @@ -3,4 +3,4 @@ # The next line is executed by /bin/sh, but not tcl \ exec wish "$0" ${1+"$@"} -set version "2.9.4" +set version "2.9.5"