fix crash using uninitialised memory from #5228 (#5237)

This commit is contained in:
ebbit1q 2024-12-11 02:19:53 +01:00 committed by GitHub
parent 20d99a78b6
commit 69741d858c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,7 +88,6 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
}
extraHeight = vbox->sizeHint(Qt::PreferredSize).height();
resize(150, 150);
QGraphicsLinearLayout *zoneHBox = new QGraphicsLinearLayout(Qt::Horizontal);
@ -247,9 +246,6 @@ void ZoneViewWidget::moveEvent(QGraphicsSceneMoveEvent * /* event */)
void ZoneViewWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
{
if (!zone)
return;
// We need to manually resize the scroll bar whenever the window gets resized
qreal totalZoneHeight = zone->getOptimumRect().height();
qreal newWindowHeight = event->newSize().height();