[OpenGL] g_pGamePersistent
is null during initialization of render_rain
#1807
Labels
g_pGamePersistent
is null during initialization of render_rain
#1807
Describe the bug
g_pGamePersistent
is null during initialization ofrender_rain
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not reading from null pointers.
Screenshots, videos
N/A
BugTrap error report
Message from UBSAN:
/mnt/data/dev/xray-16/src/Layers/xrRender/light.cpp:8:49: runtime error: member access within null pointer of type 'struct IGame_Persistent'
Crash from the patch above:
FATAL ERROR
[error] Expression : g_pGamePersistent
[error] Function : light
[error] File : /mnt/data/dev/xray-16/src/Layers/xrRender/light.cpp
[error] Line : 10
[error] Description : assertion failed
stack trace:
xrDebug::Fail(bool&, ErrorLocation const&, char const*, char const*, char const*, char const*)
xray::render::render_gl::light::light()
/mnt/data/dev/xray-16/bin/x86_64/Debug/xrRender_GL.so(+0x244c0b8) [0x7ffff504c0b8]
xray::render::render_gl::CRender::CRender()
/mnt/data/dev/xray-16/bin/x86_64/Debug/xrRender_GL.so(+0x24a580d) [0x7ffff50a580d]
/mnt/data/dev/xray-16/bin/x86_64/Debug/xrRender_GL.so(+0x24a5932) [0x7ffff50a5932]
/mnt/data/dev/xray-16/bin/x86_64/Debug/xrRender_GL.so(+0x2be59f5) [0x7ffff57e59f5]
/lib64/ld-linux-x86-64.so.2(+0x549e) [0x7ffff7fc949e]
/lib64/ld-linux-x86-64.so.2(+0x55a3) [0x7ffff7fc95a3]
/lib64/ld-linux-x86-64.so.2(+0x20b60) [0x7ffff7fe4b60]
Stack trace from gdb:
xrRender_GL.so!xray::render::render_gl::light::light(xray::render::render_gl::light * const this) (/mnt/data/dev/xray-16/src/Layers/xrRender/light.cpp:10)
xrRender_GL.so!xray::render::render_gl::render_rain::render_rain(xray::render::render_gl::render_rain * const this) (/mnt/data/dev/xray-16/src/Layers/xrRender_R2/r2.h:121)
xrRender_GL.so!xray::render::render_gl::CRender::CRender(xray::render::render_gl::CRender * const this) (/mnt/data/dev/xray-16/src/Layers/xrRender_R2/r2.cpp:865)
xrRender_GL.so!__static_initialization_and_destruction_0() (/mnt/data/dev/xray-16/src/Layers/xrRender_R2/r2.cpp:20)
xrRender_GL.so!_GLOBAL__sub_I_r2.cpp(void)() (/mnt/data/dev/xray-16/src/Layers/xrRender_R2/r2.cpp:892)
xrRender_GL.so!_sub_I_65535_0.0 (Unknown Source:0)
ld-linux-x86-64.so.2![Unknown/Just-In-Time compiled code] (Unknown Source:0)
Desktop (please complete the following information):
Additional context
Possibly introduced with 1efa85e
The text was updated successfully, but these errors were encountered: