summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-10-24 09:46:34 -0400
committerFreya Murphy <freya@freyacat.org>2025-10-24 09:46:34 -0400
commitb04d9463d680a684db5d126b209258bc81c1a001 (patch)
tree16c503b68e7dc91ba57a281ba288cc1b13abdcab /graphics
parentgraphics: refactor Renderer to not use unsafe, and allow nested modes (diff)
downloadDungeonCrawl-b04d9463d680a684db5d126b209258bc81c1a001.tar.gz
DungeonCrawl-b04d9463d680a684db5d126b209258bc81c1a001.tar.bz2
DungeonCrawl-b04d9463d680a684db5d126b209258bc81c1a001.zip
graphics: fix segfault
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs
index 2efcaed..d5a6cfe 100644
--- a/graphics/src/lib.rs
+++ b/graphics/src/lib.rs
@@ -23,15 +23,14 @@ pub type Result<T> = std::result::Result<T, crate::Error>;
/// The `Window` type represents the game window
#[derive(Debug)]
pub struct Window {
+ // persistant renderer
+ renderer: Renderer,
// core raylib handles
handle: RefCell<RaylibHandle>,
thread: RaylibThread,
- // persistant renderer
- renderer: Renderer,
// audio data/subsystem
audio: AudioData,
}
-
impl Window {
/// Instantiates a new window provided with the default
/// window `width`, `height`, and `title`.