added null checks to timeline snapping and seekablewidget seeking
This commit is contained in:
@@ -1503,6 +1503,10 @@ QVector<SnapData> AttemptSnap(const QVector<double>& screen_pt,
|
||||
|
||||
bool TimelineWidget::SnapPoint(QVector<rational> start_times, rational* movement, int snap_points)
|
||||
{
|
||||
if (!GetConnectedNode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QVector<double> screen_pt;
|
||||
|
||||
foreach (const rational& s, start_times) {
|
||||
|
||||
@@ -160,6 +160,10 @@ int SeekableWidget::TimeToScreen(const rational &time) const
|
||||
|
||||
void SeekableWidget::SeekToScreenPoint(int screen)
|
||||
{
|
||||
if (timebase().isNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int64_t timestamp = qMax(static_cast<int64_t>(0), ScreenToUnitRounded(screen));
|
||||
|
||||
if (Core::instance()->snapping() && snap_service_) {
|
||||
|
||||
Reference in New Issue
Block a user