History

fix premature octree query before preferences are loaded

Brad Hefta-Gaub committed 10 years ago

Commit bcdff7b1 parent 347293a2 files · +8 −0Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+6−0
@@ -2653,6 +2653,8 @@ void Application::loadSettings() { · 2652 unmodified lines
26532653
26542654 Menu::getInstance()->loadSettings();
26552655 getMyAvatar()->loadData();
2656+
2657+ _settingsLoaded = true;
26562658 }
26572659
26582660 void Application::saveSettings() {
@@ -3276,6 +3278,10 @@ int Application::sendNackPackets() { · 617 unmodified lines
32763278
32773279 void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) {
32783280
3281+ if (!_settingsLoaded) {
3282+ return; // bail early if settings are not loaded
3283+ }
3284+
32793285 //qCDebug(interfaceapp) << ">>> inside... queryOctree()... _viewFrustum.getFieldOfView()=" << _viewFrustum.getFieldOfView();
32803286 bool wantExtraDebugging = getLogger()->extraDebugging();
32813287