diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-17 20:37:19 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-17 20:37:19 +0200 |
commit | 30394c16ccdcdb145352e245a7a8893cef28e82d (patch) | |
tree | f847effd099d949fa170ab7b48ec0229713718da /engine | |
parent | 6e49565a62ec6e675525646217578cf52413bd92 (diff) |
fix(engine): drop objects before window to call valid GL functions
Diffstat (limited to 'engine')
-rw-r--r-- | engine/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 9d836c0..db6ab94 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -20,8 +20,9 @@ pub use glfw::WindowSize; #[derive(Debug)] pub struct Engine { - window: Window, + /// Objects have to be dropped before window. Otherwise, UB. objects: BTreeMap<ObjectId, Object>, + window: Window, } impl Engine |