History

fix crash for dereference null pointer

Andrew Meadows committed 11 years ago

Commit 40f6ecd1 parent 44d30745 files · +21 −18Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+4−4
@@ -78,10 +78,10 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 77 unmodified lines
7878 // This Node is creating a new object. If it's in motion, set this Node as the simulator.
7979 auto nodeList = DependencyManager::get<NodeList>();
8080 const QUuid myNodeID = nodeList->getSessionUUID();
81− propertiesWithSimID.setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATOR_PRIORITY);
81+ propertiesWithSimID.setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATION_PRIORITY);
8282
8383 // and make note of it now, so we can act on it right away.
84− entity->setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATOR_PRIORITY);
84+ entity->setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATION_PRIORITY);
8585
8686 entity->setLastBroadcast(usecTimestampNow());
8787 } else {
@@ -163,10 +163,10 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, EntityItemProperties proper · 75 unmodified lines
163163
164164 // we re-assert our simulation ownership
165165 properties.setSimulationOwner(myNodeID,
166− glm::max(entity->getSimulatorPriority(), SCRIPT_EDIT_SIMULATOR_PRIORITY));
166+ glm::max(entity->getSimulatorPriority(), SCRIPT_EDIT_SIMULATION_PRIORITY));
167167 } else {
168168 // we make a bid for simulation ownership
169− properties.setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATOR_PRIORITY);
169+ properties.setSimulationOwner(myNodeID, SCRIPT_EDIT_SIMULATION_PRIORITY);
170170 entity->flagForOwnership();
171171 }
172172 }