Fixes a weird bug related to pointer handling

A bug reported in https://bugzilla.gnome.org/show_bug.cgi?id=683599
made pointer parameters invalid for some types, which crashed
the plugin because it used such resource. This fixes it