Skip to content

Check that forwardStack in QTextBrowser is not empty to avoid segfault

Alec Bloss requested to merge qtextbrowser_segfault_fit into main

Closes #2 (closed)

forwardStack can be empty, and when this happens the value returned by forwardStack.top() will be invalid, thus leading to a segfault in the == operator.

Fix is to check that the stack is non-empty before doing a comparison. This doesn't affect the logic of the function.

Merge request reports

Loading