fix another c4script error when updating power network

ipv6
Maikel de Vries 2016-12-26 16:57:39 +01:00
parent aeddfd1b03
commit 2392f85358
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ private func RefreshPowerNetwork(object network)
// Merge all the producers and consumers into their actual networks.
for (var link in Concatenate(network.lib_power.idle_producers, network.lib_power.active_producers))
{
if (!link)
if (!link || !link.obj)
continue;
var actual_network = Library_Power->GetPowerNetwork(link.obj);
if (!actual_network || actual_network == network)