Skip to content

Commit

Permalink
xw_set_geo_notify: Check if grabbed view is null first
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Jun 3, 2024
1 parent 8e86ca8 commit e8ce3cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/surface/xwayland_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ static void xwayland_surface_request_configure_notify(wl_listener* listener, voi
static void xwayland_surface_set_geometry_notify(wl_listener* listener, [[maybe_unused]] void* data) {
XWaylandView& view = magpie_container_of(listener, view, set_geometry);

if (view.server.grabbed_view.lock()->get_wlr_surface() != view.get_wlr_surface()) {
auto grabbed_view = view.server.grabbed_view.lock();
if (grabbed_view != nullptr && grabbed_view->get_wlr_surface() != view.get_wlr_surface()) {
const wlr_xwayland_surface& surface = view.wlr;
if (view.curr_placement == VIEW_PLACEMENT_STACKING) {
view.previous = view.current;
Expand Down

0 comments on commit e8ce3cd

Please sign in to comment.