Do not try to parse the model list if it's empty
This commit is contained in:
@@ -48,6 +48,9 @@ bool loadModelsListFromYaml(std::vector<CategoryData>& categories,
|
|||||||
EtxModelfiles& modelFiles,
|
EtxModelfiles& modelFiles,
|
||||||
const QByteArray& data)
|
const QByteArray& data)
|
||||||
{
|
{
|
||||||
|
if (data.size() == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
YAML::Node node = loadYamlFromByteArray(data);
|
YAML::Node node = loadYamlFromByteArray(data);
|
||||||
if (!node.IsSequence()) return false;
|
if (!node.IsSequence()) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user