Changeset 1087 for trunk


Ignore:
Timestamp:
Jul 24, 2009, 11:39:50 AM (15 years ago)
Author:
garnier
Message:

correction du ticket #41

Location:
trunk/source/visualization/management
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/management/History

    r1042 r1087  
    1 $Id: History,v 1.121 2009/05/13 18:18:03 allison Exp $
     1$Id: History,v 1.122 2009/07/24 09:20:52 lgarnier Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     2924th July 2009  Laurent Garnier
     30- G4VisCommandsSceneAdd::EventID::operator() : Add a protection if
     31  CurrentSceneHandler has no model
    2832
    293313th May 2009  John Allison  (visman-V09-02-02)
  • trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc

    r954 r1087  
    2525//
    2626//
    27 // $Id: G4VisCommandsSceneAdd.cc,v 1.73 2007/11/16 20:29:04 perl Exp $
     27// $Id: G4VisCommandsSceneAdd.cc,v 1.74 2009/07/24 09:20:52 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929// /vis/scene commands - John Allison  9th August 1998
     
    232232
    233233  G4VModel* model = fpVisManager->GetCurrentSceneHandler()->GetModel();
    234   const G4ModelingParameters* mp = model->GetModelingParameters();
    235   const G4Event* currentEvent = mp->GetEvent();
    236 
     234  const G4ModelingParameters* mp;
     235  const G4Event* currentEvent;
     236  if (model) {
     237   mp = model->GetModelingParameters();
     238   currentEvent = mp->GetEvent();
     239  } else {
     240    G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
     241    if (verbosity >= G4VisManager::errors) {
     242      G4cout << "ERROR: No model defined for this SceneHandler : "<< fpVisManager->GetCurrentSceneHandler()->GetName() << G4endl;
     243    }
     244  }
    237245  if (currentRun && currentEvent) {
    238246    G4int runID = currentRun->GetRunID();
Note: See TracChangeset for help on using the changeset viewer.