protection
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Jan 2012 23:25:13 +0000 (23:25 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Jan 2012 23:25:13 +0000 (23:25 +0000)
PWG3/vertexingHF/AliAODRecoCascadeHF.h

index 0500596..7656380 100644 (file)
@@ -39,6 +39,7 @@ class AliAODRecoCascadeHF : public AliAODRecoDecayHF2Prong {
 
   // 2prong (D0 for Dstar)
   AliAODRecoDecayHF2Prong* Get2Prong() const {
+    if(!GetDaughter(1)) return 0;
     if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODRecoDecayHF2Prong") ){
       AliWarning("Object is not of type AliAODRecoDecayHF2Prong");
       return 0;