Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crash if research is earned from something other than a research …

…lab. Closes ticket:3015
  • Loading branch information...
commit 1d55132f4a13c59969cd90b560958af624160426 1 parent 2a7ec11
@perim perim authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/qtscript.cpp
View
2  src/qtscript.cpp
@@ -542,7 +542,7 @@ bool triggerStructureAttacked(STRUCTURE *psVictim, BASE_OBJECT *psAttacker)
bool triggerResearched(STRUCTURE *psStruct)
{
- for (int i = 0; i < scripts.size(); ++i)
+ for (int i = 0; i < scripts.size() && psStruct; ++i)
{
QScriptEngine *engine = scripts.at(i);
int player = engine->globalObject().property("me").toInt32();
Please sign in to comment.
Something went wrong with that request. Please try again.