Fix dangerous iterator use.
[ginac.git] / ginac / excompiler.cpp
index 8d6670f1d48f28ee1593e86457a0c475dbabf87f..80e4dd1962aec57ef28d5f5efaf9b0168c6bde6a 100644 (file)
@@ -172,7 +172,7 @@ public:
                for (std::vector<filedesc>::iterator it = filelist.begin(); it != filelist.end();) {
                        if (it->name == filename) {
                                clean_up(it);
-                               filelist.erase(it);
+                               it = filelist.erase(it);
                        } else {
                                ++it;
                        }