aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-06-26 15:14:45 +0200
committerSebastian Geerken <devnull@localhost>2016-06-26 15:14:45 +0200
commit1fe97eb1c9fd0786aadf04eb9cf8588a57fc7600 (patch)
treed10640109686bdf7fd28caf133c9fc898f637e82 /dw
parent70d3a131f1cf186b777d6353f2b830107a9d8451 (diff)
Fix another valgrind complain.
Diffstat (limited to 'dw')
-rw-r--r--dw/oofpositionedmgr.cc12
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());
}