]> www.ginac.de Git - ginac.git/blobdiff - ginac/function.pl
Fixed the parser such that it can read in user defined classes again.
[ginac.git] / ginac / function.pl
index 495432bbff3cd4e8d8fc8b56550a22f474f1a149..1ca923d462fb9556442434612e0c9f9c3d6bee3e 100644 (file)
@@ -843,6 +843,9 @@ function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser)
 function::function(unsigned ser, const exvector & v, bool discardable) 
   : exprseq(v,discardable), serial(ser)
 {
+       if ( ser >= registered_functions().size() ) {
+               throw std::runtime_error("function does not exist");
+       }
 }
 
 function::function(unsigned ser, std::auto_ptr<exvector> vp)