]> www.ginac.de Git - ginac.git/blobdiff - ginac/container.h
lst(0) now works as expected
[ginac.git] / 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)