root/root-TPad-WaitPrimitive.patch
Mattias Ellert ec7f16e89c Update to 6.08.04
Fix broken TPad::WaitPrimitive (backport from git)
Rebuild for gcc 6.3
2017-01-15 08:35:38 +01:00

22 lines
894 B
Diff

diff --git a/graf2d/gpad/src/TPad.cxx b/graf2d/gpad/src/TPad.cxx
index 06bd216..6efeec5 100644
--- a/graf2d/gpad/src/TPad.cxx
+++ b/graf2d/gpad/src/TPad.cxx
@@ -6312,6 +6312,8 @@ void TPad::UseCurrentStyle()
TObject *TPad::WaitPrimitive(const char *pname, const char *emode)
{
+ if (!gPad) return 0;
+
if (strlen(emode)) gROOT->SetEditorMode(emode);
if (gROOT->GetEditorMode() == 0 && strlen(pname) > 2) gROOT->SetEditorMode(&pname[1]);
@@ -6323,7 +6325,7 @@ TObject *TPad::WaitPrimitive(const char *pname, const char *emode)
Bool_t hasname = strlen(pname) > 0;
if (!pname[0] && !emode[0]) testlast = kTRUE;
if (testlast) gROOT->SetEditorMode();
- while (!gSystem->ProcessEvents() && gROOT->GetSelectedPad()) {
+ while (!gSystem->ProcessEvents() && gPad) {
if (gROOT->GetEditorMode() == 0) {
if (hasname) {
obj = FindObject(pname);