mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +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) {
|
if (updatedTotal != secondsTotal) {
|
||||||
secondsTotal = updatedTotal;
|
secondsTotal = updatedTotal;
|
||||||
if (secondsTotal <= 0 && secondsTotal != INT_MIN) {
|
if (secondsTotal <= 0 && secondsTotal != INT_MIN) {
|
||||||
std::string duration =
|
if (this->track) {
|
||||||
this->track->GetString(constants::Track::DURATION);
|
std::string duration =
|
||||||
|
this->track->GetString(constants::Track::DURATION);
|
||||||
if (duration.size()) {
|
if (duration.size()) {
|
||||||
secondsTotal = std::stoi(duration);
|
secondsTotal = std::stoi(duration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user