From 38803763496763474adf3e1107a550104e0d9aaa Mon Sep 17 00:00:00 2001 From: Webster Sheets Date: Mon, 4 Sep 2023 19:32:54 -0400 Subject: [PATCH] Fix lighting crash immediately after hyperspace --- src/Camera.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Camera.cpp b/src/Camera.cpp index 353f008d561..e76027523b5 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -362,6 +362,9 @@ void Camera::CalcLighting(const Body *b, double &ambient, double &direct) const direct = 1.0; Body *astro = Frame::GetFrame(b->GetFrame())->GetBody(); + if (!astro) + return; + Planet *planet = static_cast(astro); FrameId rotFrame = planet->GetFrame();