diff options
| author | lat9nq <lat9nq@gmail.com> | 2022-03-07 03:37:54 -0500 |
|---|---|---|
| committer | lat9nq <lat9nq@gmail.com> | 2022-03-07 18:21:56 -0500 |
| commit | 173ddc9e6b226b18fb00d256ab8d9d89c8c4af36 (patch) | |
| tree | 93c23176ccbc92e7340262a7279edbe2f3888d1c /src/input_common/input_engine.cpp | |
| parent | e3f8340bec780641ac4035b5d013965d84977e38 (diff) | |
video_core: Cancel Scoped's exit call on GPU failure
When CreateRenderer fails, the GraphicsContext that was std::move'd into
it is destroyed before the Scoped that was created to manage its
currency. In that case, the GraphicsContext::Scoped will still call its
destructor at the ending of the function. And because the context is
destroyed, the Scoped will cause a crash as it attempts to call a
destroyed object's DoneCurrent function.
Since we know when the call would be invalid, call the Scoped's Cancel
method. This prevents it from calling a method on a destroyed object.
Diffstat (limited to 'src/input_common/input_engine.cpp')
0 files changed, 0 insertions, 0 deletions
