diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/commandbuffer.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/commandbuffer.cc b/src/core/commandbuffer.cc index 53d200f..11a48b4 100644 --- a/src/core/commandbuffer.cc +++ b/src/core/commandbuffer.cc @@ -172,9 +172,13 @@ void func_list_model(std::string const &args) void func_list_materials(std::string const &args) { - model::Material *material = model::Material::find(args); - if (material) { - material->print(); + if (args.size()) { + model::Material *material = model::Material::find(args); + if (material) { + material->print(); + } else { + con_warn << "Unknown material '" << args << "'" << std::endl; + } } else { model::Material::list(); } |