Skip to content
  • Niklas Haas's avatar
    libplacebo: fix use-after-free on uninit · e4a584e3
    Niklas Haas authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    `pl->ops->close` destroys the GPU instance, after which the swapchain is
    undefined. Fix it by moving the swapchain destruction to `ops->close`
    itself, where it can be done in the correct order.
    
    (This also fixes a bug where, technically, the opengl instance attempted
    destroying the swapchain while the context was not current on the
    thread)
    e4a584e3