Commit bb10beb1 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

QML Observer: fix possible crash

parent b04a4dde
......@@ -181,8 +181,6 @@ void CrumblePath::resizeEvent(QResizeEvent *)
void CrumblePath::resizeButtons()
{
Q_ASSERT(!m_buttons.isEmpty());
int buttonWidth = 0;
if (m_buttons.length() > 1) {
QPoint nextElementPosition(0,0);
......@@ -202,7 +200,7 @@ void CrumblePath::resizeButtons()
button->stackUnder(m_buttons[i - 1]);
}
} else {
} else if (m_buttons.length() == 1) {
QWidget *button = m_buttons[0];
int buttonWidth = 2 * width() / (3 * m_buttons.length());
......
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