Coverity Fix 16220
authormvala <mvala@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 27 Feb 2011 10:53:13 +0000 (10:53 +0000)
committermvala <mvala@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 27 Feb 2011 10:53:13 +0000 (10:53 +0000)
ANALYSIS/EventMixing/AliMixInputEventHandler.cxx

index 3ab369f..fd9bab8 100644 (file)
@@ -525,8 +525,10 @@ Bool_t AliMixInputEventHandler::IsEventCurrentSelected()
    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
    AliMultiInputEventHandler *mh = dynamic_cast<AliMultiInputEventHandler *>(mgr->GetInputEventHandler());
    Bool_t isSelected = kTRUE;
-   if (fOfflineTriggerMask && mh->GetEventSelection()) {
-      isSelected = fOfflineTriggerMask & mh->IsEventSelected();
+   if (mh) {
+      if (fOfflineTriggerMask && mh->GetEventSelection()) {
+         isSelected = fOfflineTriggerMask & mh->IsEventSelected();
+      }
    }
    AliDebug(AliLog::kDebug + 1, Form("isSelected=%d", isSelected));
    AliDebug(AliLog::kDebug + 5, Form("-> %d", isSelected));