mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Fixed a super old null pointer dereference in TransportWindow.
This commit is contained in:
parent
20ca61058c
commit
e1884321ff
@ -223,11 +223,12 @@ struct musik::cube::TransportDisplayCache {
|
||||
if (updatedTotal != secondsTotal) {
|
||||
secondsTotal = updatedTotal;
|
||||
if (secondsTotal <= 0 && secondsTotal != INT_MIN) {
|
||||
std::string duration =
|
||||
this->track->GetString(constants::Track::DURATION);
|
||||
|
||||
if (duration.size()) {
|
||||
secondsTotal = std::stoi(duration);
|
||||
if (this->track) {
|
||||
std::string duration =
|
||||
this->track->GetString(constants::Track::DURATION);
|
||||
if (duration.size()) {
|
||||
secondsTotal = std::stoi(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user