| 1075 | |
| 1076 | // Keep extra-player preview bookkeeping consistent when a preview tab is closed directly. |
| 1077 | for (auto PreviewItr = ExtraGamePreviews.begin(); PreviewItr != ExtraGamePreviews.end(); ++PreviewItr) |
| 1078 | { |
| 1079 | if (PreviewItr->Tool == Tool) |
| 1080 | { |
| 1081 | ExtraGamePreviews.erase(PreviewItr); |
| 1082 | break; |
| 1083 | } |
| 1084 | } |
| 1085 | |
| 1086 | // Nothing else drops this reference, so a closed tool would leave File > Save and Ctrl+S |
| 1087 | // calling OnSave on freed memory. |
| 1088 | if (Tool == LastActiveTool) |
| 1089 | { |
nothing calls this directly
no test coverage detected