aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-14 04:35:50 +0100
committerJohannes Schickel2015-12-14 05:08:05 +0100
commitcb8e611e3373d8a87c931855916cf079eaad55dc (patch)
tree6b411d99878be38067af74247efa83ee06275307 /engines/sword25/gfx
parent184ae49302792a924856ae051f1a96078f0723a1 (diff)
downloadscummvm-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/gfx')
-rw-r--r--engines/sword25/gfx/panel.cpp2
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);
}