瀏覽代碼

Wayland: Add missing return in selection logic

Fixup to "Wayland: Check selection devices before using them"

This slipped under the radar... until for some reason optimized builds
started crashing, perhaps due to timing-related shenanigans, no idea.
Riteo 3 月之前
父節點
當前提交
67c317c58d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      platform/linuxbsd/wayland/wayland_thread.cpp

+ 1 - 0
platform/linuxbsd/wayland/wayland_thread.cpp

@@ -4566,6 +4566,7 @@ void WaylandThread::selection_set_text(const String &p_text) {
 
 	if (ss->wl_data_device == nullptr) {
 		DEBUG_LOG_WAYLAND_THREAD("Couldn't set selection, seat doesn't have wl_data_device.");
+		return;
 	}
 
 	ss->selection_data = p_text.to_utf8_buffer();