clear old avatarEntityData when saving settings

This commit is contained in:
Andrew Meadows 2017-02-08 14:14:48 -08:00
parent cc301d1c1a
commit e02810458b

View file

@ -795,6 +795,11 @@ void MyAvatar::saveData() {
}
settings.endArray();
if (_avatarEntityData.size() == 0) {
// HACK: manually remove empty 'avatarEntityData' else deleted avatarEntityData may show up in settings file
settings.remove("avatarEntityData");
}
settings.beginWriteArray("avatarEntityData");
int avatarEntityIndex = 0;
auto hmdInterface = DependencyManager::get<HMDScriptingInterface>();