Coverity Fix 16220
[u/mrichter/AliRoot.git] / ANALYSIS / EventMixing / AliMixInputEventHandler.cxx
index 3ab369f226cb7870b106b032641b499bc79c3784..fd9bab82f30476227be7354ee1beac821102afb6 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));