mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[Poincare/integral_layout.cpp] Fixed crash due to infinite loop
Changed previousNestedIntegral method to prevent integrals located in integral bounds to be considered as nested. Change-Id: Id8cc4369f53c278ac59039fde1c2818af2ccacab
This commit is contained in:
committed by
Émilie Feral
parent
685b2a8d6d
commit
edcc1f6e80
@@ -251,8 +251,13 @@ IntegralLayoutNode * IntegralLayoutNode::previousNestedIntegral() {
|
||||
return nullptr;
|
||||
}
|
||||
if (p->type() == Type::IntegralLayout) {
|
||||
// Parent can be an integral
|
||||
return static_cast<IntegralLayoutNode *>(p);
|
||||
// Parent is an integral. Checking if the child is its integrand or not
|
||||
if (p->childAtIndex(0) == this) {
|
||||
return static_cast<IntegralLayoutNode *>(p);
|
||||
} else {
|
||||
// If this is not parent's integrand, it means that it is either a bound or differential
|
||||
return nullptr;
|
||||
}
|
||||
} else if (p->type() == Type::HorizontalLayout) {
|
||||
// Or can be a Horizontal layout himself contained in an integral
|
||||
LayoutNode * prev = p->parent();
|
||||
|
||||
Reference in New Issue
Block a user