Skip to content
Snippets Groups Projects
Commit e3a8bba3 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

video: fix nullptr deferencing in video::noise()

Refs #67228

Change-Id: Idb39d86404cf9c420d6971005332d745e64b6114
parent 41b827b1
Branches
Tags
No related merge requests found
......@@ -132,9 +132,9 @@ void
VideoFrame::noise()
{
auto f = frame_.get();
auto tot = size();
for (int i=0 ; i<tot ; ++i)
{
if (f->data[0] == nullptr)
return;
for (std::size_t i=0 ; i < size(); ++i) {
f->data[0][i] = std::rand() & 255;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment