Commit 27aaf3d5 authored by Chen Bill's avatar Chen Bill Committed by GitHub

fix dereference nullptr & use uninitialized memory (#5)

* SColor: initialize color

* r5684 on ogl-es
parent 0515d19c
...@@ -444,7 +444,7 @@ namespace video ...@@ -444,7 +444,7 @@ namespace video
} }
//! color in A8R8G8B8 Format //! color in A8R8G8B8 Format
u32 color; u32 color{};
}; };
......
...@@ -72,8 +72,11 @@ namespace video ...@@ -72,8 +72,11 @@ namespace video
//! Destructor //! Destructor
~SMaterialLayer() ~SMaterialLayer()
{ {
MatrixAllocator.destruct(TextureMatrix); if(TextureMatrix)
MatrixAllocator.deallocate(TextureMatrix); {
MatrixAllocator.destruct(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
}
} }
//! Assignment operator //! Assignment operator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment