Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #308 - Add null check for removing item from uninitialized QuadTree #314

Merged
merged 1 commit into from
Oct 3, 2016

Conversation

barbeau
Copy link
Collaborator

@barbeau barbeau commented Sep 10, 2016

I was able to repro #308 NPE by trying to remove an item before any item was inserted - I added a test case that repro's this NPE at the beginning of PointQuadTreeTest.testMultiplePoints():

response = mTree.remove(item1);
assertFalse(response);

Adding a null check in PointQuadTree.remove() fixes this.

@xsorifc28
Copy link

Awesome, can't wait for the merge.

@barbeau
Copy link
Collaborator Author

barbeau commented Oct 3, 2016

@stephenmcd a friendly reminder to PTAL, when you have a moment. I was able to repro the bug within the unit test and then fix to make it pass, so it's a pretty straightforward fix.

@stephenmcd
Copy link
Contributor

Thanks for the reminder! Looks good.

@stephenmcd stephenmcd merged commit c20c63c into googlemaps:master Oct 3, 2016
@barbeau barbeau deleted the quadTreeRemove branch October 3, 2016 23:53
@philipbjorge
Copy link

Thanks all

@natansalda
Copy link

Is that possible this bug is introduced again? I still have problem with that, please take a look #348 (comment)

@barbeau
Copy link
Collaborator Author

barbeau commented Oct 20, 2021

@natansalda At a glance it looks like this is a different issue - I'll reply on your other comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants