mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r16532) -Fix [Squirrel]: Don't copy an object when we just checked that the pointer to it is NULL
This commit is contained in:
parent
d7663017e5
commit
1c754c75d6
2
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@ -938,7 +938,7 @@ common_call:
|
||||
traps -= ci->_etraps;
|
||||
if(sarg1 != MAX_FUNC_STACKSIZE) STK(arg1) = temp_reg;
|
||||
}
|
||||
else { Raise_Error(_SC("trying to yield a '%s',only genenerator can be yielded"), GetTypeName(ci->_generator)); SQ_THROW();}
|
||||
else { Raise_Error(_SC("trying to yield a '%s',only genenerator can be yielded"), GetTypeName(ci->_closure)); SQ_THROW();}
|
||||
if(Return(arg0, arg1, temp_reg)){
|
||||
assert(traps == 0);
|
||||
outres = temp_reg;
|
||||
|
Loading…
Reference in New Issue
Block a user