desktop/reserved: fix a possible reserved crash (#13207)
This commit is contained in:
parent
ff061d177e
commit
339661229d
2 changed files with 16 additions and 1 deletions
|
|
@ -16,7 +16,8 @@ CReservedArea::CReservedArea(double top, double right, double bottom, double lef
|
|||
}
|
||||
|
||||
CReservedArea::CReservedArea(const CBox& parent, const CBox& child) {
|
||||
ASSERT(!parent.empty() && !child.empty());
|
||||
if (parent.empty() || child.empty())
|
||||
return; // empty reserved area
|
||||
|
||||
ASSERT(parent.containsPoint(child.pos() + Vector2D{0.0001, 0.0001}));
|
||||
ASSERT(parent.containsPoint(child.pos() + child.size() - Vector2D{0.0001, 0.0001}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue