Don't crash when setting mark on invalid url.
This commit is contained in:
parent
fd20b46b33
commit
88f66874a1
@ -656,7 +656,13 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
key: mark identifier; capital indicates a global mark
|
key: mark identifier; capital indicates a global mark
|
||||||
"""
|
"""
|
||||||
# strip the fragment as it may interfere with scrolling
|
# strip the fragment as it may interfere with scrolling
|
||||||
url = self.current_url().adjusted(QUrl.RemoveFragment)
|
try:
|
||||||
|
url = self.current_url().adjusted(QUrl.RemoveFragment)
|
||||||
|
except qtutils.QtValueError:
|
||||||
|
# show an error only if the mark is not automatically set
|
||||||
|
if key != "'":
|
||||||
|
message.error(self._win_id, "Failed to set mark: url invalid")
|
||||||
|
return
|
||||||
point = self.currentWidget().page().currentFrame().scrollPosition()
|
point = self.currentWidget().page().currentFrame().scrollPosition()
|
||||||
|
|
||||||
if key.isupper():
|
if key.isupper():
|
||||||
|
Loading…
Reference in New Issue
Block a user