Skip to content

Commit

Permalink
SMD-2259 Fixed crashlytics crash
Browse files Browse the repository at this point in the history
- Fixed a crash in case time is not convertible to string
  • Loading branch information
Stefano Russello committed Jul 13, 2023
1 parent 475706d commit b70c78f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Change Log:

All notable changes to this project will be documented in this section.

### 1.2.5 - Fixed crashlytics crash

### 1.2.4 - Fixed StreamPlay FixtureID field types

### 1.2.3
Expand Down
4 changes: 3 additions & 1 deletion Source/StreamSDKPlayKit/Player/Analytics/HeatMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class HeatMap {
if (currentTime < sectionStart || currentTime > sectionEnd) {
markNewSection(currentTime: currentTime)
} else if currentSectionCount > 5 {
heatMap[currentSection] = 1
if currentSection < heatMap.count {
heatMap[currentSection] = 1
}
} else {
currentSectionCount += 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ class AMGPlayKitStandardControl: UIView, AMGControlDelegate {

if !time.isFinite || time.isNaN {
self.errorListener?.onError(error: PlaykitError(entryID: nil, errorParameter: "\(time)", exception: "Failed to convert time to String"))
return ""
}
var formattedTimeLeft = formatter.string(from: time)!
let formattedSplit = formattedTimeLeft.split(separator: ":")
Expand Down
2 changes: 1 addition & 1 deletion StreamAMGSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

spec.name = "StreamAMGSDK"
spec.version = "1.2.4"
spec.version = "1.2.5"
spec.summary = "Stream AMG SDK"
spec.swift_versions = "5"

Expand Down

0 comments on commit b70c78f

Please sign in to comment.