Fix function pointer check.

Task-number: QTBUG-34284
Change-Id: Id8a2205f41012f7235bd2f422d02b7f997b88bc9
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>