From 6b81a4b8825f3496e220be071d2b80829a274b9e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 7 Apr 2022 22:30:19 +0900 Subject: [PATCH] [renderer] Don't try to animate lightstyles that aren't there Prevents a segfault when running the renderer via qwaq-x11. --- libs/video/renderer/r_light.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/video/renderer/r_light.c b/libs/video/renderer/r_light.c index d9a96915e..2f063e9d9 100644 --- a/libs/video/renderer/r_light.c +++ b/libs/video/renderer/r_light.c @@ -126,6 +126,10 @@ R_AnimateLight (void) { int i, j, k; + if (!r_data->lightstyle) { + return; + } + // light animations // 'm' is normal light, 'a' is no light, 'z' is double bright i = (int) (r_data->realtime * 10);