Skip to content

Commit

Permalink
Update glow_integration.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jun 16, 2024
1 parent 108b6da commit 321133c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/eframe/src/native/glow_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,11 +1261,12 @@ impl GlutinWindowContext {
if let Some(viewport) = self.viewports.get(&viewport_id) {
if let Some(gl_surface) = &viewport.gl_surface {
change_gl_context(&mut self.current_gl_context, gl_surface);
let Some(current_gl_context) = self.current_gl_context.as_ref() else {
return;
};

gl_surface.resize(
self.current_gl_context
.as_ref()
.expect("failed to get current context to resize surface"),
current_gl_context,
width_px,
height_px,
);
Expand Down

0 comments on commit 321133c

Please sign in to comment.