From ada7c7bb11e99ea31cc4b417de9892b71ec8525c Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 18 Apr 2013 21:07:21 +0100 Subject: Prevent "!set type none blah" 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 * 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) { -- cgit v0.9.2-21-gd62e