Fixes: CID1591931 Explicit null dereferenced
Unified · Split
| @@ -1373,7 +1373,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, · 1372 unmodified lines | ||
| 1373 | 1373 | if (ctx->device_filter[otherDevType]) { |
| 1374 | 1374 | // avoid adding add two instances of the same device to the graph, one for video, one for audio |
| 1375 | 1375 | // a few devices don't support this (could also do this check earlier to avoid double crossbars, etc. but they seem OK) |
| 1376 | − if (strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) { | |
| 1376 | + if (!device_filter_unique_name || strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) { | |
| 1377 | 1377 | av_log(avctx, AV_LOG_DEBUG, "reusing previous graph capture filter... %s\n", device_filter_unique_name); |
| 1378 | 1378 | IBaseFilter_Release(device_filter); |
| 1379 | 1379 | device_filter = ctx->device_filter[otherDevType]; |