Fix NPE on clipboard copy.