diff --git a/src/apps/common/options.cpp b/src/apps/common/options.cpp
index cae193cc..29a5d9c7 100644
--- a/src/apps/common/options.cpp
+++ b/src/apps/common/options.cpp
@@ -1095,7 +1095,7 @@ OptionsParser::childOption(const Option *parent, Options *options)
 		std::tie(options, error) = childOption(parent->parent, options);
 
 		/* Propagate the error all the way back up the call stack. */
-		if (!error)
+		if (error)
 			return { options, error };
 	}
 
