From a5ddcfc1b2c3f7a9a7dfeaee5f0ea696fbd056fe Mon Sep 17 00:00:00 2001 From: Axel Naumann <Axel.Naumann@cern.ch> Date: Wed, 4 Oct 2017 12:44:23 +0200 Subject: [PATCH] Assert that Draw() happens in fParent. --- graf2d/gpad/v7/src/TPad.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graf2d/gpad/v7/src/TPad.cxx b/graf2d/gpad/v7/src/TPad.cxx index ddc37bac539..882d74f3bd9 100644 --- a/graf2d/gpad/v7/src/TPad.cxx +++ b/graf2d/gpad/v7/src/TPad.cxx @@ -19,6 +19,7 @@ #include "ROOT/TPadExtent.hxx" #include "ROOT/TPadPos.hxx" +#include <cassert> #include <limits> ROOT::Experimental::TPadBase::~TPadBase() = default; @@ -54,3 +55,8 @@ ROOT::Experimental::TPadBase::Divide(int nHoriz, int nVert, const TPadExtent &pa } ROOT::Experimental::TPad::~TPad() = default; + +ROOT::Experimental::TPadDrawable::TPadDrawable(std::unique_ptr<TPad> &&pPad, TPadBase& parent): fPad(std::move(pPad)), fOpts(parent) +{ + assert(&fPad->GetParent() == &parent && "Parent mismatch!"); +} -- GitLab