mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
[libcalamares] Asking for type of undefined node throws
- Use YAML-CPP API for finding out if a node has a value at all. - Asking for Type() of an undefined or NULL node throws an exception, so the existing code didn't **actually** catch cases where a required setting wasn't set at all.
This commit is contained in:
parent
ec09272b81
commit
d59a44be44
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@
|
|||
static bool
|
||||
hasValue( const YAML::Node& v )
|
||||
{
|
||||
return !( ( v.Type() == YAML::NodeType::Null ) || ( v.Type() == YAML::NodeType::Undefined ) );
|
||||
return v.IsDefined() && !v.IsNull();
|
||||
}
|
||||
|
||||
/** Helper function to grab a QString out of the config, and to warn if not present. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue