浏览代码

Fix memory leak when handling Linux primary clipboard

Haoyu Qiu 3 年之前
父节点
当前提交
bccd23f4bf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/x11/os_x11.cpp

+ 1 - 1
platform/x11/os_x11.cpp

@@ -2229,7 +2229,7 @@ Atom OS_X11::_process_selection_request_target(Atom p_target, Window p_requestor
 		// is the owner during a selection request.
 		CharString clip;
 		static const char *target_type = "PRIMARY";
-		if (p_selection != None && String(XGetAtomName(x11_display, p_selection)) == target_type) {
+		if (p_selection != None && get_atom_name(x11_display, p_selection) == target_type) {
 			clip = OS::get_clipboard_primary().utf8();
 		} else {
 			clip = OS::get_clipboard().utf8();