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 qlinear_viewer to avoid error on wheelEvent #1054

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

xxr0ss
Copy link
Contributor

@xxr0ss xxr0ss commented Aug 6, 2023

When switch Disassembly view to the linear view and scroll the view while the binary is still loading (the view is still blank), an TypeError will raise

  File "/xxx/angrmanagement/ui/widgets/qlinear_viewer.py", line 169, in wheelEvent
    self.verticalScrollBar().setValue(self.offset * self._line_height)
                                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

Cause:

self.offset could still be None after prepare_objects() and when wheelEvent() uses it to do calculations, error raises

@twizmwazin twizmwazin merged commit f28bfb1 into angr:master Aug 31, 2023
23 checks passed
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.

2 participants