]> www.ginac.de Git - ginac.git/blobdiff - ginac/tensor.cpp
Bug fix for tensor::replace_contr_index().
[ginac.git] / ginac / tensor.cpp
index c215237d85f9d1225913b7fff4f87e59e0bc8134..25935f420b3e49ee8ba9ea1df612373baa10e425 100644 (file)
@@ -395,6 +395,8 @@ bool tensor::replace_contr_index(exvector::iterator self, exvector::iterator oth
 again:
        if (self_idx->is_symbolic()) {
                for (size_t i=1; i<other->nops(); i++) {
+                       if (! is_a<idx>(other->op(i)))
+                               continue;
                        const idx &other_idx = ex_to<idx>(other->op(i));
                        if (is_dummy_pair(*self_idx, other_idx)) {