fix crash when cancel file dialog at CopyToPC