Ignore:
Timestamp:
11/13/02 17:03:19 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r1554 r1600  
    154154    // delete fGeomCam;
    155155
    156     // Maybe harmfull! Don't exchange the order!
    157     if (fIsAllocated && fDrawingPad->GetListOfPrimitives()->FindObject(this)==this)
    158     {
    159         fDrawingPad->RecursiveRemove(this);
    160         delete fDrawingPad;
    161     }
     156    // Not allocated by MCamDisplay or already deleted by the user
     157    if (!fIsAllocated || !gROOT->GetListOfCanvases()->FindObject(fDrawingPad))
     158        return;
     159
     160    // If it is not already removed make sure that nothing of this object
     161    // maybe be deleted automatically by the canvas destructor
     162    if (!fDrawingPad->GetListOfPrimitives()->FindObject(this))
     163        return;
     164
     165    fDrawingPad->RecursiveRemove(this);
     166    delete fDrawingPad;
    162167}
    163168
Note: See TracChangeset for help on using the changeset viewer.