Fix a crash in MaterialManager when the brand of the material is None.

Fix other possible cases when the type or the color are also None.
This commit is contained in:
Diego Prado Gesto 2018-06-07 10:54:23 +02:00
parent 971d6306bf
commit 97a1aa1a2b
2 changed files with 11 additions and 7 deletions

View file

@ -482,7 +482,7 @@ Item
{
var currentItem = materialsModel.getItem(materialListView.currentIndex);
materialProperties.name = currentItem.name;
materialProperties.name = currentItem.name ? currentItem.name : "Unknown";
materialProperties.guid = currentItem.guid;
materialProperties.brand = currentItem.brand ? currentItem.brand : "Unknown";