diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/nel3d_interface.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/nel3d_interface.cpp index aa44a64ab..d028099bb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/nel3d_interface.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/material_editor/nel3d_interface.cpp @@ -310,7 +310,7 @@ namespace MaterialEditor CNelMaterialProxy CNel3DInterface::getMaterial() { NL3D::CDynMaterial *mat = NULL; - if( !currentShape.empty() ) + if( !currentShape.empty() && ( currentShape.getNumMaterials() > 0 ) ) mat = currentShape.getMaterial( subMatId ).getObjectPtr()->getDynMat(); return CNelMaterialProxy( mat );