diff --git a/modules/highgui/src/cap_images.cpp b/modules/highgui/src/cap_images.cpp index 4cf51d8e5d..e2feb0d279 100644 --- a/modules/highgui/src/cap_images.cpp +++ b/modules/highgui/src/cap_images.cpp @@ -203,7 +203,7 @@ static char* icvExtractPattern(const char *filename, unsigned *offset) for(at = name; *at && !isdigit(*at); at++) ; - if(!at) + if(!*at) return 0; sscanf(at, "%u", offset);