-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Abandon context if not current when closing the app #355
fix: Abandon context if not current when closing the app #355
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
==========================================
- Coverage 53.11% 53.08% -0.03%
==========================================
Files 147 147
Lines 12989 12996 +7
==========================================
Hits 6899 6899
- Misses 6090 6097 +7 ☔ View full report in Codecov by Sentry. |
@@ -46,6 +47,14 @@ pub struct WindowEnv<T: Clone> { | |||
pub(crate) window_config: WindowConfig<T>, | |||
} | |||
|
|||
impl<T: Clone> Drop for WindowEnv<T> { | |||
fn drop(&mut self) { | |||
if !self.gl_context.is_current() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to try to make the context current and only abandon if making it current fails.
No description provided.