core: fix unchecked pointer