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

KoptInterface:getWordFromBoxes: guard against nil boxes #6827

Merged
merged 1 commit into from Oct 26, 2020
Merged

Conversation

pazos
Copy link
Member

@pazos pazos commented Oct 25, 2020

Fixes #6825


This change is Reviewable

@NiLuJe
Copy link
Member

NiLuJe commented Oct 25, 2020

Does this also prevent the stats issue or should that be taken care of, too?

@poire-z
Copy link
Contributor

poire-z commented Oct 25, 2020

Does this also prevent the stats issue or should that be taken care of, too?

No, the stats issue is another thing to be taken care of.
I haven't given it much thoughts (as it's a bit of a mess, the initial initialization of things).
But at minima, adding to ReaderStatistics:onAddHighlight and ReaderStatistics:onDelHighlight a:
if not self.is_enabled then return end
shouldn't hurt, and avoid the error.

@NiLuJe
Copy link
Member

NiLuJe commented Oct 25, 2020

@poire-z: Yup, I'll do that, thanks ;).

NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Oct 25, 2020
@NiLuJe NiLuJe merged commit 40b4ccf into master Oct 26, 2020
@NiLuJe NiLuJe added the bug label Oct 26, 2020
@NiLuJe NiLuJe added this to the 2020.11 milestone Oct 26, 2020
NiLuJe added a commit that referenced this pull request Oct 26, 2020
@pazos pazos deleted the nil_boxes_1 branch December 10, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on higlight (attempt to get length of local 'boxes')
3 participants