From bcdff7ba4a42c8fe68d3da69233b5f9a5c0fc61c Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Tue, 19 Jan 2016 13:11:11 -0800 Subject: [PATCH] fix premature octree query before preferences are loaded --- interface/src/Application.cpp | 6 ++++++ interface/src/Application.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7dcb863049..fa730c5d40 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2653,6 +2653,8 @@ void Application::loadSettings() { Menu::getInstance()->loadSettings(); getMyAvatar()->loadData(); + + _settingsLoaded = true; } void Application::saveSettings() { @@ -3276,6 +3278,10 @@ int Application::sendNackPackets() { void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) { + if (!_settingsLoaded) { + return; // bail early if settings are not loaded + } + //qCDebug(interfaceapp) << ">>> inside... queryOctree()... _viewFrustum.getFieldOfView()=" << _viewFrustum.getFieldOfView(); bool wantExtraDebugging = getLogger()->extraDebugging(); diff --git a/interface/src/Application.h b/interface/src/Application.h index 3840e10c93..30cda33051 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -510,6 +510,8 @@ private: bool _reticleClickPressed { false }; int _avatarAttachmentRequest = 0; + + bool _settingsLoaded { false }; }; #endif // hifi_Application_h