[DF-4354] Fixed crash in LibPngWrapper