diff --git a/src/common/textures/hw_material.h b/src/common/textures/hw_material.h index f6311c962..ee752c1f4 100644 --- a/src/common/textures/hw_material.h +++ b/src/common/textures/hw_material.h @@ -47,7 +47,7 @@ class FMaterial bool TrimBorders(uint16_t *rect); public: - FTexture *tex; + FTexture *tex = nullptr; FTexture *sourcetex; // in case of redirection this is different from tex. FMaterial(FTexture *tex, bool forceexpand); diff --git a/src/rendering/hwrenderer/scene/hw_renderstate.h b/src/rendering/hwrenderer/scene/hw_renderstate.h index 6ec91b6c3..c20898169 100644 --- a/src/rendering/hwrenderer/scene/hw_renderstate.h +++ b/src/rendering/hwrenderer/scene/hw_renderstate.h @@ -90,7 +90,7 @@ struct FStateVec4 struct FMaterialState { - FMaterial *mMaterial; + FMaterial *mMaterial = nullptr; int mClampMode; int mTranslation; int mOverrideShader;