Skip to content

Commit efb9516

Browse files
authored
[gpad] avoid nullptr dereference
found out by clang-tidy
1 parent 8e73bb6 commit efb9516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graf2d/gpad/src/TPad.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7023,7 +7023,7 @@ TObject *TPad::WaitPrimitive(const char *pname, const char *emode)
70237023
TObject *obj = nullptr;
70247024
Bool_t testlast = kFALSE;
70257025
Bool_t hasname = pname && (strlen(pname) > 0);
7026-
if (!pname[0] && !emode[0]) testlast = kTRUE;
7026+
if ((!pname || !pname[0]) && (!emode || !emode[0])) testlast = kTRUE;
70277027
if (testlast) gROOT->SetEditorMode();
70287028
while (!gSystem->ProcessEvents() && gROOT->GetSelectedPad() && gPad) {
70297029
if (gROOT->GetEditorMode() == 0) {

0 commit comments

Comments
 (0)