forked from qt-creator/qt-creator
Timeline: Don't accidentally add nullptr timeline models
Change-Id: I7ecce618c83a67742a9d57b967dbfbbccd05310e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -135,7 +135,7 @@ int TimelineNotesModel::get(int modelId, int timelineIndex) const
|
||||
int TimelineNotesModel::add(int modelId, int timelineIndex, const QString &text)
|
||||
{
|
||||
Q_D(TimelineNotesModel);
|
||||
const TimelineModel *model = d->timelineModels[modelId];
|
||||
const TimelineModel *model = d->timelineModels.value(modelId);
|
||||
int typeId = model->typeId(timelineIndex);
|
||||
TimelineNotesModelPrivate::Note note = { text, modelId, timelineIndex };
|
||||
d->data << note;
|
||||
|
||||
Reference in New Issue
Block a user