Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2014-12-22 16:02:48 +0000
committerStijn Buys <ingar@osirion.org>2014-12-22 16:02:48 +0000
commit871552eab28d07c3aaf0cabb5fb167c0eb365bdf (patch)
tree0c91777d067e3b5323070b458c1affd6f11669da /src/core
parenta5aef07b4a2b85933f3a2f358a4d1b6fe27948b7 (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.cc10
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();
}