Fixed invalid pointer when creating image links.