UFbxExportOption crash

Hello. I’ve trying to create some FBX export options but am getting crashes. It is the second of these two lines:

TObjectPtr<UFbxExportOption> OverrideOptions;
OverrideOptions->bExportSourceMesh = 0;

And this won’t compile:

UFbxExportOption* OverrideOptions = NewObject<UFbxExportOption>();

Would any one know why this is? Sorry if this is relatively basic question.

Many Thanks