Skip to content

Commit 9a5d1f9

Browse files
committed
Fix crash
1 parent ff3e4b5 commit 9a5d1f9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/dsql/AggNodes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,12 +985,15 @@ void ListAggNode::getDesc(thread_db* tdbb, CompilerScratch* csb, dsc* desc)
985985

986986
ValueExprNode* ListAggNode::copy(thread_db* tdbb, NodeCopier& copier) const
987987
{
988-
ListAggNode* node = FB_NEW_POOL(*tdbb->getDefaultPool()) ListAggNode(*tdbb->getDefaultPool(),
989-
distinct);
988+
ListAggNode* node = FB_NEW_POOL(*tdbb->getDefaultPool()) ListAggNode(*tdbb->getDefaultPool(), distinct);
989+
990990
node->nodScale = nodScale;
991991
node->arg = copier.copy(tdbb, arg);
992992
node->delimiter = copier.copy(tdbb, delimiter);
993-
node->sort = sort->copy(tdbb, copier);
993+
994+
if (sort)
995+
node->sort = sort->copy(tdbb, copier);
996+
994997
return node;
995998
}
996999

0 commit comments

Comments
 (0)