Core/SAI: fixed a crash

This commit is contained in:
Ovahlord committed 2018-03-28 22:05:25 +02:00
1 parent 485f63fb21
commit 20314730ad
1 file changed
+2 -1
@@ -1446,7 +1446,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
e.GetTargetType() == SMART_TARGET_SELF || e.GetTargetType() == SMART_TARGET_STORED)*/
{
// we want to move to random element
target = Trinity::Containers::SelectRandomContainerElement(targets);
if (!targets.empty())
target = Trinity::Containers::SelectRandomContainerElement(targets);
}
if (!target)