nvda
77881aea - Fix unbound local variable. (#13601)

Commit
3 years ago
Fix unbound local variable. (#13601) Fixes #13600 Summary of the issue: PR #13589 introduced an unbound local variable error: ERROR - queueHandler.flushQueue (19:43:42.878) - MainThread (8840): Error in func VirtualBuffer._loadBufferDone Traceback (most recent call last): File "queueHandler.pyc", line 55, in flushQueue File "virtualBuffers\__init__.pyc", line 492, in _loadBufferDone File "browseMode.pyc", line 1306, in event_treeInterceptor_gainFocus File "virtualBuffers\gecko_ia2.pyc", line 532, in _getInitialCaretPos File "browseMode.pyc", line 1850, in _getInitialCaretPos UnboundLocalError: local variable 'caretPos' referenced before assignment` caretPos will not be set if self.shouldRememberCaretPositionAcrossLoads is False. Description of how this pull request fixes the issue: Return caretPos within the above if condition and return None by default.
Parents
Loading