summaryrefslogtreecommitdiff
path: root/graphics/asymptote/runarray.in
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/runarray.in')
-rw-r--r--graphics/asymptote/runarray.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/graphics/asymptote/runarray.in b/graphics/asymptote/runarray.in
index 8a33fc0954..293c628f18 100644
--- a/graphics/asymptote/runarray.in
+++ b/graphics/asymptote/runarray.in
@@ -667,6 +667,7 @@ array* :copyArrayValue(Int n, item value, Int depth=Int_MAX, Int typeDepth)
// automatically pushed on the stack and is not visible to the user.
array* :copyArray(array *a, Int depth=Int_MAX, Int typeDepth)
{
+ if(a == 0) vm::error(dereferenceNullArray);
if(depth < 0) error("cannot copy to a negative depth");
if(depth > typeDepth) depth=typeDepth;
return a->copyToDepth(depth);