Skip to content

Commit

Permalink
Merge pull request #673 from deepakrawat22/picker_fix
Browse files Browse the repository at this point in the history
Null check for owner to fix SIGSEGV in immersivepedia
  • Loading branch information
liaxim authored Jul 7, 2016
2 parents f606ba5 + d1f4100 commit 64b2a45
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void Picker::pickScene(Scene* scene, std::vector<ColliderData>& picklist, float

for (auto it = colliders.begin(); it != colliders.end(); ++it) {
Collider* collider = reinterpret_cast<Collider*>(*it);
if (collider->enabled() && collider->owner_object()->enabled()) {
SceneObject* owner = collider->owner_object();
if (collider->enabled() && (owner != NULL) && owner->enabled()) {
ColliderData data = collider->isHit(view_matrix, glm::vec3(ox, oy, oz), glm::vec3(dx, dy, dz));
if ((collider->pick_distance() > 0) && (collider->pick_distance() < data.Distance)) {
data.IsHit = false;
Expand Down

0 comments on commit 64b2a45

Please sign in to comment.