Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ static bool twin_fbdev_update_damage(void *closure)
twin_fbdev_t *tx = PRIV(closure);
twin_screen_t *screen = SCREEN(closure);

if (!tx->vt_active && twin_screen_damaged(screen))
if (!tx->vt_active && (tx->fb_base == MAP_FAILED) &&
Copy link
Contributor

@jserv jserv Jun 28, 2025

Choose a reason for hiding this comment

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

Should the condition tx->fb_base == MAP_FAILED be considered as an early return?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I experimented based on the following code and found that the issue still persists.

--- a/backend/fbdev.c
+++ b/backend/fbdev.c
@@ -190,6 +190,9 @@ static bool twin_fbdev_update_damage(void *closure)
     twin_fbdev_t *tx = PRIV(closure);
     twin_screen_t *screen = SCREEN(closure);
 
+    if (tx->fb_base == MAP_FAILED)
+       return;
+
     if (!tx->vt_active && twin_screen_damaged(screen))
         twin_screen_update(screen);

twin_screen_damaged(screen))
twin_screen_update(screen);

return true;
Expand Down