diff options
author | Stijn Buys <ingar@osirion.org> | 2014-12-22 16:02:48 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2014-12-22 16:02:48 +0000 |
commit | 871552eab28d07c3aaf0cabb5fb167c0eb365bdf (patch) | |
tree | 0c91777d067e3b5323070b458c1affd6f11669da /src/core | |
parent | a5aef07b4a2b85933f3a2f358a4d1b6fe27948b7 (diff) |
Fixed a bug where the lad/savegame dialog wouldn't show the screenshot of the first selected savegame,
minor code cleamups in material handling.
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(); } |