From 871552eab28d07c3aaf0cabb5fb167c0eb365bdf Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 22 Dec 2014 16:02:48 +0000 Subject: Fixed a bug where the lad/savegame dialog wouldn't show the screenshot of the first selected savegame, minor code cleamups in material handling. --- src/core/commandbuffer.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/core') 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(); } -- cgit v1.2.3