Fix segfault calling 'pending' (part of the main activations loop)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>