diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/formats.c | 7 | ||||
-rw-r--r-- | src/core/processors.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/formats.c b/src/core/formats.c index b528e62..9ff31b2 100644 --- a/src/core/formats.c +++ b/src/core/formats.c @@ -178,9 +178,10 @@ static format_t *find_format_by_key(const char *key) result = NULL; - for (i = 0; i < _formats_definitions_count; i++) - if (strcmp(_formats_definitions[i].key, key) == 0) - result = &_formats_definitions[i]; + if (key != NULL) + for (i = 0; i < _formats_definitions_count; i++) + if (strcmp(_formats_definitions[i].key, key) == 0) + result = &_formats_definitions[i]; return result; diff --git a/src/core/processors.c b/src/core/processors.c index 7489614..715cd88 100644 --- a/src/core/processors.c +++ b/src/core/processors.c @@ -179,9 +179,10 @@ static proc_t *find_processor_by_key(const char *key) result = NULL; - for (i = 0; i < _processors_definitions_count; i++) - if (strcmp(_processors_definitions[i].key, key) == 0) - result = &_processors_definitions[i]; + if (key != NULL) + for (i = 0; i < _processors_definitions_count; i++) + if (strcmp(_processors_definitions[i].key, key) == 0) + result = &_processors_definitions[i]; return result; |