Check for the right function pointer

This code checked whether one function pointer was non-null,
but the went on to call a different function pointer. Check
for the one that actually was called.