mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
Bug #1989 fixed. NULL pointer check added.
This commit is contained in:
parent
d3c73071ea
commit
6903e8f0fd
@ -199,7 +199,7 @@ protected:
|
|||||||
int is_supported(const char* supp_modes_key, const char* mode)
|
int is_supported(const char* supp_modes_key, const char* mode)
|
||||||
{
|
{
|
||||||
const char* supported_modes = params.get(supp_modes_key);
|
const char* supported_modes = params.get(supp_modes_key);
|
||||||
return strstr(supported_modes, mode) > 0;
|
return (supported_modes && mode && (strstr(supported_modes, mode) > 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
float getFocusDistance(int focus_distance_type)
|
float getFocusDistance(int focus_distance_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user