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:
Johannes Schickel 2015-12-14 04:35:50 +01:00
parent 184ae49302
commit cb8e611e33

View File

@ -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);
}