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
5 changes: 5 additions & 0 deletions sunshine/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ class session_t {
session_t(ctx_t &&ctx, std::shared_ptr<platf::hwdevice_t> &&device, int inject) : ctx { std::move(ctx) }, device { std::move(device) }, inject { inject } {}

session_t(session_t &&other) noexcept = default;
~session_t() {
// Order matters here because the context relies on the hwdevice still being valid
ctx.reset();
device.reset();
}

// Ensure objects are destroyed in the correct order
session_t &operator=(session_t &&other) {
Expand Down