m_shortInputCounter is initialized in RSITimer::suggestBreak only.
Non-null m_shortInputCounter is needed in RSITimer::timeout in case of
TimerState::Resting.
In no pop-up mode RSIBreak goes to RSITimer::timeout omitting
RSITimer::suggestBreak which results in trying to tick uninitialized
m_shortInputCounter.
This patch makes sure that m_shortInputCounter is always initialized.
Details
Details
- Reviewers
aacid pino - Commits
- R368:4a52ca7bc582: Fix crash when not using popup
Diff Detail
Diff Detail
- Repository
- R368 RSIBreak
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Is this an actual problem with the app or just a test fix (i.e. do i need to make a release to fix a potential crash?)
src/rsitimer.cpp | ||
---|---|---|
318 | So you change this from 2,2,1 to 2,1,1 that ok? |
Comment Actions
Yes, it will crash in certain configuration (showing popup disabled). I think, you need to make a new release.
src/rsitimer.cpp | ||
---|---|---|
318 | Yes. Number in the middle has no other meaning than to indicate, that this counter got activated and it does that by showing any positive and non-zero value. |