Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Treeland occasionally crash #362

Closed
wants to merge 1 commit into from
Closed

Conversation

lbwtw
Copy link

@lbwtw lbwtw commented Jun 4, 2024

x11 applications crash when use because of use null pointer.

Log: fixed crash
Issue: linuxdeepin/treeland#283

x11 applications crash when use because of use null pointer.

Log: fixed crash
Issue: linuxdeepin/treeland#283
@@ -940,7 +940,7 @@ void WSurfaceItem::onSurfaceCommit()
// Maybe the beforeRequestResizeSurfaceStateSeq is set by resizeSurfaceToItemSize,
// the resizeSurfaceToItemSize wants to resize the wl_surface to current size of WSurfaceitem,
// If change the WSurfaceItem's size at here, you will see the WSurfaceItem flash.
if (d->beforeRequestResizeSurfaceStateSeq < d->surface->handle()->handle()->current.seq) {
if (Q_LIKELY(d->surface) && d->beforeRequestResizeSurfaceStateSeq < d->surface->handle()->handle()->current.seq) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, d->surface must is not nullptr here.

@lbwtw lbwtw closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants