Skip to content

Commit 7c7b02e

Browse files
committed
Fix crash when using empty list in sym/asym (issues/129)
1 parent f10cac6 commit 7c7b02e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/algorithms/sym.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ using namespace cadabra;
88
sym::sym(const Kernel& k, Ex& tr, Ex& objs, bool s)
99
: Algorithm(k, tr), objects(objs), sign(s)
1010
{
11+
if(objects.size()==0)
12+
throw ArgumentException("sym/asym: need a list of objects over which to (anti)symmetrise.");
1113
}
1214

1315
bool sym::can_apply(iterator it)

0 commit comments

Comments
 (0)