summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 4e57ac18..f7ce128e 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -224,8 +224,11 @@ target_symbol::assert_no_components(const std::string& tapset)
}
-void target_symbol::chain (semantic_error *e)
+void target_symbol::chain (const semantic_error &er)
{
+ semantic_error* e = new semantic_error(er);
+ if (!e->tok1)
+ e->tok1 = this->tok;
assert (e->chain == 0);
e->chain = this->saved_conversion_error;
this->saved_conversion_error = e;