# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1612853834 -3600
# Node ID 2d750e38a4c623781b9122ad0f7a1c219cd8d187
# Parent  bdd81e12e7b56129ef89ffa2a79208881c5925fb
SVGHMI: Prevent Dropdown widget to mak exception whe value out of range

diff -r bdd81e12e7b5 -r 2d750e38a4c6 svghmi/widget_dropdown.ysl2
--- a/svghmi/widget_dropdown.ysl2	Tue Feb 09 07:56:25 2021 +0100
+++ b/svghmi/widget_dropdown.ysl2	Tue Feb 09 07:57:14 2021 +0100
@@ -295,6 +295,7 @@
             b.height.baseVal.value = m.height;
         }
         highlight_selection(){
+            if(this.last_selection == undefined) return;
             let highlighted_row = this.last_selection - this.menu_offset;
             if(highlighted_row < 0) return;
             let spans = this.text_elt.children;