diff options
author | Sebastian Geerken <devnull@localhost> | 2016-06-26 15:14:45 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-06-26 15:14:45 +0200 |
commit | 1fe97eb1c9fd0786aadf04eb9cf8588a57fc7600 (patch) | |
tree | d10640109686bdf7fd28caf133c9fc898f637e82 | |
parent | 70d3a131f1cf186b777d6353f2b830107a9d8451 (diff) |
Fix another valgrind complain.
-rw-r--r-- | dw/oofpositionedmgr.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc index bf04c034..90f354d7 100644 --- a/dw/oofpositionedmgr.cc +++ b/dw/oofpositionedmgr.cc @@ -53,7 +53,17 @@ OOFPositionedMgr::OOFPositionedMgr (OOFAwareWidget *container) children = new Vector<Child> (1, false); childrenByWidget = new HashTable<TypedPointer<Widget>, Child> (true, true); - containerAllocation = *(container->getAllocation()); + if(container->wasAllocated()) { + containerAllocationState = WAS_ALLOCATED; + containerAllocation = *(container->getAllocation()); + } else { + containerAllocationState = NOT_ALLOCATED; + containerAllocation.x = -1; + containerAllocation.y = -1; + containerAllocation.width = 1; + containerAllocation.ascent = 1; + containerAllocation.descent = 0; + } DBG_OBJ_SET_NUM ("children.size", children->size()); } |