浏览代码

Ignore invalid tablet driver name, when non are available.

bruvzg 5 年之前
父节点
当前提交
ef1a305e50
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      platform/windows/os_windows.cpp

+ 3 - 0
platform/windows/os_windows.cpp

@@ -795,6 +795,9 @@ String OS_Windows::get_current_tablet_driver() const {
 }
 }
 
 
 void OS_Windows::set_current_tablet_driver(const String &p_driver) {
 void OS_Windows::set_current_tablet_driver(const String &p_driver) {
+	if (get_tablet_driver_count() == 0) {
+		return;
+	}
 	bool found = false;
 	bool found = false;
 	for (int i = 0; i < get_tablet_driver_count(); i++) {
 	for (int i = 0; i < get_tablet_driver_count(); i++) {
 		if (p_driver == get_tablet_driver_name(i)) {
 		if (p_driver == get_tablet_driver_name(i)) {