summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/layout.c b/layout.c
index 5916d66f5..0212699ab 100644
--- a/layout.c
+++ b/layout.c
@@ -58,6 +58,8 @@ static struct romentry *_layout_entry_by_name(
const struct flashrom_layout *const layout, const char *name)
{
struct romentry *entry = NULL;
+ if (!layout || !name)
+ return NULL;
while ((entry = mutable_layout_next(layout, entry))) {
if (!strcmp(entry->name, name))
return entry;