Permalink
Browse files

QtWebEngine: Fix crash when closing/reopening tabs

  • Loading branch information...
The-Compiler committed Aug 1, 2016
1 parent 5ec39b7 commit 81d0d647319bbff1ac6c079f871afacae97c6760
Showing with 4 additions and 0 deletions.
  1. +4 −0 qutebrowser/browser/webengine/webenginetab.py
@@ -211,6 +211,10 @@ def _on_scroll_pos_changed(self):
"""Update the scroll position attributes when it changed."""
def update_scroll_pos(jsret):
"""Callback after getting scroll position via JS."""
if jsret is None:
# This can happen when the callback would get called after
# shutting down a tab
return
assert isinstance(jsret, dict), jsret
self._pos_perc = (jsret['perc']['x'], jsret['perc']['y'])
self._pos_px = QPoint(jsret['px']['x'], jsret['px']['y'])

0 comments on commit 81d0d64

Please sign in to comment.