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

Already on GitHub? Sign in to your account

fixed: addoninstaller unguarded null pointer after #2475 #2489

Merged
merged 1 commit into from Mar 23, 2013

Conversation

Projects
None yet
3 participants
Member

Voyager1 commented Mar 23, 2013

This fixes a small bug when an addon dependency is not present (don't have) and not mandatory. In that case a null pointer exception happens.

This bug is there since b0825b1

Contributor

ulion commented Mar 23, 2013

maybe we should keep the result of 'std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end()' to push_back only when it's true.

Member

Voyager1 commented Mar 23, 2013

@ulion - (disregard previous comment). you're right that would work.

Member

Voyager1 commented Mar 23, 2013

updated commit per @ulion comment.

Member

jmarshallnz commented Mar 23, 2013

Looks OK to me.

Contributor

ulion commented Mar 23, 2013

I mean, dep could already in the preDeps vector, so it's better not push it in again, so to reuse the std::find result only push when dep not in preDeps will be better :)

ulion added a commit that referenced this pull request Mar 23, 2013

Merge pull request #2489 from Voyager1/fix_addoninstaller_np
fixed: addoninstaller unguarded null pointer after #2475

@ulion ulion merged commit 3be9067 into xbmc:master Mar 23, 2013

Contributor

ulion commented Mar 24, 2013

I did an additional commit for the 'better': cc39b66

@Voyager1 Voyager1 deleted the Voyager1:fix_addoninstaller_np branch May 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment