Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
committerStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
commitf33257521bf80dcef8575c4fc3ddaf4a40ff588a (patch)
tree5e3a112e814478ba3ab624e0867761654a5ea0a4 /src/game/base/shipmodel.cc
parent5b94df1df2707b36401d91d80b92d0e4cdfd2277 (diff)
fixed a few widget order problems, changed map targetting behaviour
Diffstat (limited to 'src/game/base/shipmodel.cc')
-rw-r--r--src/game/base/shipmodel.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc
index b3802f7..9d905d6 100644
--- a/src/game/base/shipmodel.cc
+++ b/src/game/base/shipmodel.cc
@@ -107,6 +107,9 @@ ShipModel *ShipModel::find(ShipModel *shipmodel)
ShipModel *ShipModel::find(const std::string label)
{
+ if (!label.size())
+ return 0;
+
std::map<std::string, ShipModel *>::iterator it = registry.find(label);
if (it == registry.end())
return 0;
@@ -116,6 +119,9 @@ ShipModel *ShipModel::find(const std::string label)
ShipModel *ShipModel::search(const std::string searchname)
{
+ if (!searchname.size())
+ return 0;
+
std::string strsearchkey(aux::lowercase(searchname));
if (strsearchkey.size() < 3) {
return 0;