videoio(dshow): add NULL ptr check

pull/19830/head
Alexander Alekhin 4 years ago
parent 5340dc6686
commit d7cb2ea210
  1. 1
      modules/videoio/src/cap_dshow.cpp

@ -2731,6 +2731,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
}
VIDEOINFOHEADER *pVih = reinterpret_cast<VIDEOINFOHEADER*>(VD->pAmMediaType->pbFormat);
CV_Assert(pVih);
int currentWidth = HEADER(pVih)->biWidth;
int currentHeight = HEADER(pVih)->biHeight;

Loading…
Cancel
Save