From ff83cfac10939ceba524c93d4e36f634f4bec805 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 19 May 2017 19:09:17 +0200 Subject: Make sure we don't resize to negative values. --- plugingui/mainwindow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugingui/mainwindow.cc') diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc index 578af28..d98d335 100644 --- a/plugingui/mainwindow.cc +++ b/plugingui/mainwindow.cc @@ -99,7 +99,7 @@ void MainWindow::repaintEvent(RepaintEvent* repaintEvent) void MainWindow::sizeChanged(std::size_t width, std::size_t height) { - tabs.resize(width - 2 * 16, height); + tabs.resize(std::max((int)width - 2 * 16, 0), height); } void MainWindow::closeEventHandler() -- cgit v1.2.3