diff options
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r-- | platform/windows/os_windows.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index a2941dd43e..0dab0c601a 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -786,7 +786,7 @@ String OS_Windows::get_tablet_driver_name(int p_driver) const { if (p_driver < 0 || p_driver >= tablet_drivers.size()) { return ""; } else { - return tablet_drivers[p_driver].utf8().get_data(); + return tablet_drivers[p_driver]; } } @@ -795,6 +795,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)) { |