Explicitly check label xml element if it's none

For some stupid reason, an XML element evaluates to false.
CURA-1968
This commit is contained in:
Jaime van Kessel 2016-08-24 16:10:21 +02:00
parent e1df8d74d3
commit 3a921264fc

View file

@ -241,7 +241,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
color = entry.find("./um:color", self.__namespaces)
label = entry.find("./um:label", self.__namespaces)
if label:
if label is not None:
self.setName(label.text)
else:
self.setName(self._profile_name(material.text, color.text))