From ada7c7bb11e99ea31cc4b417de9892b71ec8525c Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 18 Apr 2013 21:07:21 +0100 Subject: [PATCH] Prevent "!set type none blah" --- src/cat/TPTScriptInterface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index 2e824efc2..5d9a5e05b 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -334,6 +334,8 @@ AnyType TPTScriptInterface::tptS_set(std::deque * 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) {