Verified Commit f86366ee authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix possible out of bound access in command bar


Signed-off-by: Waqar Ahmed's avatarWaqar Ahmed <waqar.17a@gmail.com>
parent ef07c57e
...@@ -226,6 +226,11 @@ public: ...@@ -226,6 +226,11 @@ public:
btns.append({r, text}); btns.append({r, text});
} }
// we have nothing, just return
if (btns.isEmpty()) {
return;
}
const auto plusRect = option.fontMetrics.boundingRect(QLatin1Char('+')); const auto plusRect = option.fontMetrics.boundingRect(QLatin1Char('+'));
// draw them // draw them
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment