]> www.ginac.de Git - ginac.git/commitdiff
lst(0) now works as expected
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 13 Aug 2003 18:35:31 +0000 (18:35 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 13 Aug 2003 18:35:31 +0000 (18:35 +0000)
ginac/container.h

index 88ccd6a0adec63d4800abea17db8cd36d327d701..a6dea4a6db38cf5957a2b0000dfbcd8848d90e72 100644 (file)
@@ -95,9 +95,13 @@ public:
 
        explicit container(STLT * vp) : inherited(get_tinfo())
        {
-               GINAC_ASSERT(vp);
-               this->seq.swap(*vp);
-               delete vp;
+               if (vp == 0) {
+                       // lst(0) ends up here
+                       this->seq.push_back(0);
+               } else {
+                       this->seq.swap(*vp);
+                       delete vp;
+               }
        }
 
        container(exvector::const_iterator b, exvector::const_iterator e)