mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 11:57:25 +00:00
SWORD25: Fix uninitialized variable usage.
When using the constructor of Panel which directly calls unpersist _color was uninitialized. However, unpersit uses setColor which assumes _color is initialized properly. Caused valgrind warnings when loading.
This commit is contained in:
parent
184ae49302
commit
cb8e611e33
@ -62,7 +62,7 @@ Panel::Panel(RenderObjectPtr<RenderObject> parentPtr, int width, int height, uin
|
||||
}
|
||||
|
||||
Panel::Panel(InputPersistenceBlock &reader, RenderObjectPtr<RenderObject> parentPtr, uint handle) :
|
||||
RenderObject(parentPtr, RenderObject::TYPE_PANEL, handle) {
|
||||
RenderObject(parentPtr, RenderObject::TYPE_PANEL, handle), _color(0) {
|
||||
_initSuccess = unpersist(reader);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user