diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-04-18 20:07:21 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-04-18 20:07:21 (GMT) |
| commit | ada7c7bb11e99ea31cc4b417de9892b71ec8525c (patch) | |
| tree | 9b6481d8b3a468fab4b1a3bd6eb9b6f712de9d99 /src | |
| parent | b9f150f0d2e5487622a188213c1ddad67f9fc751 (diff) | |
| download | powder-ada7c7bb11e99ea31cc4b417de9892b71ec8525c.zip powder-ada7c7bb11e99ea31cc4b417de9892b71ec8525c.tar.gz | |
Prevent "!set type none blah"
Diffstat (limited to 'src')
| -rw-r--r-- | src/cat/TPTScriptInterface.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index 2e824ef..5d9a5e0 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -334,6 +334,8 @@ AnyType TPTScriptInterface::tptS_set(std::deque<std::string> * words) if(type<0 || type>=PT_NUM) throw GeneralException("Invalid particle type"); + if(type==0) + throw GeneralException("Cannot set properties of particles that do not exist"); std::cout << propertyOffset << std::endl; switch(propertyFormat) { |
