Skip to content

Commit

Permalink
spice-display: fix crash in destroy texture with IOSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Aug 2, 2021
1 parent f275f43 commit e8f8220
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/spice-display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,10 @@ static void spice_gl_switch(DisplayChangeListener *dcl,
int width = 0, height = 0;

if (ssd->ds) {
#if defined(CONFIG_IOSURFACE)
// need to release texture from surface before destorying it
spice_iosurface_flush(ssd);
#endif
surface_gl_destroy_texture(ssd->gls, ssd->ds);
}
ssd->ds = new_surface;
Expand Down

0 comments on commit e8f8220

Please sign in to comment.