Commit 46baa6cb authored by Nicolas Carion's avatar Nicolas Carion
Browse files

force fuzzer to use valid binids

parent 89393287
......@@ -279,9 +279,18 @@ void fuzz(const std::string &input)
PlaylistState::ClipState state = PlaylistState::VideoOnly;
std::string binId;
ss >> binId >> id >> state_id >> speed;
QString binClip = QString::fromStdString(binId);
bool valid = true;
if (!pCore->projectItemModel()->hasClip(binClip)) {
if (pCore->projectItemModel()->getAllClipIds().size() == 0) {
valid = false;
} else {
binClip = pCore->projectItemModel()->getAllClipIds()[0];
}
}
state = static_cast<PlaylistState::ClipState>(state_id);
if (timeline) {
ClipModel::construct(timeline, QString::fromStdString(binId), -1, state, speed);
if (timeline && valid) {
ClipModel::construct(timeline, binClip, -1, state, speed);
}
} else if (c == "constr_TrackModel") {
auto timeline = get_timeline();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment