Commit e3a8bba3 authored by Guillaume Roguez's avatar Guillaume Roguez

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

Refs #67228

Change-Id: Idb39d86404cf9c420d6971005332d745e64b6114
parent 41b827b1
......@@ -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;
}
}
......
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