From c1cb731e6f9f9d3572d4de9c6b0437f7c497b2d8 Mon Sep 17 00:00:00 2001 From: Enrico Guiraud Date: Fri, 1 Sep 2017 12:34:25 +0200 Subject: [PATCH] [TDF] Fix ROOT-8975: TDF crashed when `Define`ing an existing branch --- tree/treeplayer/inc/ROOT/TDFInterface.hxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tree/treeplayer/inc/ROOT/TDFInterface.hxx b/tree/treeplayer/inc/ROOT/TDFInterface.hxx index 919054259ad4f..c9a9d777727c8 100644 --- a/tree/treeplayer/inc/ROOT/TDFInterface.hxx +++ b/tree/treeplayer/inc/ROOT/TDFInterface.hxx @@ -337,6 +337,9 @@ public: /// Refer to the first overload of this method for the full documentation. TInterface Define(std::string_view name, std::string_view expression) { + auto loopManager = GetDataFrameChecked(); + // this check must be done before jitting lest we throw exceptions in jitted code + TDFInternal::CheckTmpBranch(name, loopManager->GetTree()); auto retVal = CallJitTransformation("Define", name, expression); return *(TInterface *)retVal; }