To handle:
NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Renderer:get_sharedMaterials ()
  at UMAData.cleanMesh (Boolean destroyRenderer) [0x00000] in <filename unknown>:0
  at UMAData.OnDestroy () [0x00000] in <filename unknown>:0

I check OnApplicationQuit before cleaning materials.
Now I clean materials after recreating a mesh, to handle Avatar old materials.