diff --git a/src/dogroups.c b/src/dogroups.c index 9b7b4cbc9..cbf10e09e 100644 --- a/src/dogroups.c +++ b/src/dogroups.c @@ -39,9 +39,12 @@ static bool anySpecialStatic(SEXP x) { // with PR#4164 started to copy input list columns too much. Hence PR#4655 in v1.13.2 moved that copy here just where it is needed. // Currently the marker is negative truelength. These specials are protected by us here and before we release them // we restore the true truelength for when R starts to use vector truelength. + const int n = length(x); + if (n==0) + return false; if (isVectorAtomic(x)) return TRUELENGTH(x)<0; - if (isNewList(x)) for (int i=0; i