diff options
author | Johannes Schickel | 2015-12-14 04:35:50 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-14 05:08:05 +0100 |
commit | cb8e611e3373d8a87c931855916cf079eaad55dc (patch) | |
tree | 6b411d99878be38067af74247efa83ee06275307 /engines/sword25 | |
parent | 184ae49302792a924856ae051f1a96078f0723a1 (diff) | |
download | scummvm-rg350-cb8e611e3373d8a87c931855916cf079eaad55dc.tar.gz scummvm-rg350-cb8e611e3373d8a87c931855916cf079eaad55dc.tar.bz2 scummvm-rg350-cb8e611e3373d8a87c931855916cf079eaad55dc.zip |
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.
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/gfx/panel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp index 9699db7f6a..2b71854060 100644 --- a/engines/sword25/gfx/panel.cpp +++ b/engines/sword25/gfx/panel.cpp @@ -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); } |