From 1642c4163da50b1dfb0ab8dfe6dd6f4a7c9ce3e2 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 26 May 2020 21:03:45 +0300 Subject: [PATCH] Ignore invalid tablet driver name, when non are available. (cherry picked from commit ef1a305e50331611db628a25ca777ffe824d37f3) --- platform/windows/os_windows.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 50695fce659..596acf1f71b 100755 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -3508,6 +3508,9 @@ String OS_Windows::get_current_tablet_driver() const { } void OS_Windows::set_current_tablet_driver(const String &p_driver) { + if (get_tablet_driver_count() == 0) { + return; + } bool found = false; for (int i = 0; i < get_tablet_driver_count(); i++) { if (p_driver == get_tablet_driver_name(i)) {