{"action":"created","issue":{"url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/166","labels_url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/166/comments","events_url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/166/events","html_url":"https://github.com/cmangos/mangos-wotlk/pull/166","id":108783921,"number":166,"title":"Fixed crash in instance resetting code in MapPersistentStateManager::_ResetOrWarnAll","user":{"login":"namreeb","id":5429489,"avatar_url":"https://avatars.githubusercontent.com/u/5429489?v=3","gravatar_id":"","url":"https://api.github.com/users/namreeb","html_url":"https://github.com/namreeb","followers_url":"https://api.github.com/users/namreeb/followers","following_url":"https://api.github.com/users/namreeb/following{/other_user}","gists_url":"https://api.github.com/users/namreeb/gists{/gist_id}","starred_url":"https://api.github.com/users/namreeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namreeb/subscriptions","organizations_url":"https://api.github.com/users/namreeb/orgs","repos_url":"https://api.github.com/users/namreeb/repos","events_url":"https://api.github.com/users/namreeb/events{/privacy}","received_events_url":"https://api.github.com/users/namreeb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-29T02:43:07Z","updated_at":"2015-09-29T08:32:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cmangos/mangos-wotlk/pulls/166","html_url":"https://github.com/cmangos/mangos-wotlk/pull/166","diff_url":"https://github.com/cmangos/mangos-wotlk/pull/166.diff","patch_url":"https://github.com/cmangos/mangos-wotlk/pull/166.patch"},"body":"DungeonPersistentState::UnbindThisState calls Player::UnbindInstance\r\nWhich calls DungeonPersistentState::RemovePlayer\r\nWhich calls MapPersistentState::UnloadIfEmpty\r\nWhich calls MapPersistentStateManager::RemovePersistentState.\r\n\r\nMapPersistentStateManager::RemovePersistentState modifies the m_instanceSaveByInstanceId collection being iterated over in MapPersistentStateManager::_ResetOrWarnAll\r\n\r\nThough perhaps it is cleaner to update the iterator upon removal, it would be a much more drastic change, and I think ultimately not as clean.\r\n\r\nI am submitting this via pull request to give people an opportunity to review it."},"comment":{"url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/comments/143986812","html_url":"https://github.com/cmangos/mangos-wotlk/pull/166#issuecomment-143986812","issue_url":"https://api.github.com/repos/cmangos/mangos-wotlk/issues/166","id":143986812,"user":{"login":"stfx","id":341158,"avatar_url":"https://avatars.githubusercontent.com/u/341158?v=3","gravatar_id":"","url":"https://api.github.com/users/stfx","html_url":"https://github.com/stfx","followers_url":"https://api.github.com/users/stfx/followers","following_url":"https://api.github.com/users/stfx/following{/other_user}","gists_url":"https://api.github.com/users/stfx/gists{/gist_id}","starred_url":"https://api.github.com/users/stfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stfx/subscriptions","organizations_url":"https://api.github.com/users/stfx/orgs","repos_url":"https://api.github.com/users/stfx/repos","events_url":"https://api.github.com/users/stfx/events{/privacy}","received_events_url":"https://api.github.com/users/stfx/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T08:32:46Z","updated_at":"2015-09-29T08:32:46Z","body":"I agree with @VladimirMangos"}}