Skip to content

Commit

Permalink
xwayland: verify new xsurf is valid in prop reads
Browse files Browse the repository at this point in the history
fixes #6250
  • Loading branch information
vaxerski committed May 29, 2024
1 parent ebf2587 commit a60c728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xwayland/XWM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void CXWM::readProp(SP<CXWaylandSurface> XSURF, uint32_t atom, xcb_get_property_
const auto XID = (xcb_window_t*)xcb_get_property_value(reply);
XSURF->transient = XID;
if (XID) {
if (const auto NEWXSURF = windowForXID(*XID); !lookupParentExists(XSURF, NEWXSURF)) {
if (const auto NEWXSURF = windowForXID(*XID); NEWXSURF && !lookupParentExists(XSURF, NEWXSURF)) {
XSURF->parent = NEWXSURF;
NEWXSURF->children.push_back(XSURF);
} else
Expand Down

0 comments on commit a60c728

Please sign in to comment.