mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
xfreerdp: fix xf_GetWindowProperty
xf_GetWindowProperty should return False if the specified property does not exist. It is not sufficient to simply check for the return value of XGetWindowProperty. XGetWindowProperty also returns Success if the specified property does not exist. However, it will return "None" to the actual_type_return parameter in that case. This change fixes several crashes with some (exotic) window managers.
This commit is contained in:
@@ -95,6 +95,12 @@ boolean xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int leng
|
||||
if (status != Success)
|
||||
return False;
|
||||
|
||||
if (actual_type == None)
|
||||
{
|
||||
DEBUG_WARN("Property %lu does not exist", property);
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user