Fix crash when closing tabs on Qt 5.2.1 (Trusty)
This issue was introduced in 8f1d81a644
.
This commit is contained in:
parent
b5d3b264e8
commit
87951ee3a8
@ -368,7 +368,15 @@ class BrowserPage(QWebPage):
|
|||||||
frame: The QWebFrame which gets saved.
|
frame: The QWebFrame which gets saved.
|
||||||
item: The QWebHistoryItem to be saved.
|
item: The QWebHistoryItem to be saved.
|
||||||
"""
|
"""
|
||||||
if frame != self.mainFrame():
|
try:
|
||||||
|
if frame != self.mainFrame():
|
||||||
|
return
|
||||||
|
except RuntimeError:
|
||||||
|
# With Qt 5.2.1 (Ubuntu Trusty) we get this when closing a tab:
|
||||||
|
# RuntimeError: wrapped C/C++ object of type BrowserPage has
|
||||||
|
# been deleted
|
||||||
|
# Since the information here isn't that important for closing
|
||||||
|
# webviews anyways, we ignore this error.
|
||||||
return
|
return
|
||||||
data = {
|
data = {
|
||||||
'zoom': frame.zoomFactor(),
|
'zoom': frame.zoomFactor(),
|
||||||
|
Loading…
Reference in New Issue
Block a user