Skip to content

Commit

Permalink
Added catch for empty flow results (#146)
Browse files Browse the repository at this point in the history
Catch for empty flow results that was causing a null pointer
  • Loading branch information
amcgreevy-r7 authored Jul 19, 2024
1 parent a934197 commit 77cd2f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/launcher/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package launcher

import (
"context"
"errors"

"www.velocidex.com/golang/cloudvelo/schema/api"
cvelo_schema_api "www.velocidex.com/golang/cloudvelo/schema/api"
Expand Down Expand Up @@ -148,7 +149,9 @@ func (self *FlowStorageManager) LoadCollectionContext(

collection_context = mergeRecords(collection_context, stats_context)
}

if collection_context == nil {
return nil, errors.New("Not found")
}
launcher.UpdateFlowStats(collection_context)

return collection_context, nil
Expand Down

0 comments on commit 77cd2f6

Please sign in to comment.