Skip to content

Commit

Permalink
Fix occasional segfault on poll type selection in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescowens committed Jan 9, 2024
1 parent 5d8153a commit d052907
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/qt/voting/additionalfieldstableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ AdditionalFieldsTableView::~AdditionalFieldsTableView()
void AdditionalFieldsTableView::resizeEvent(QResizeEvent* event)
{
int height = horizontalHeader()->height();

if (!model()) {
return;
}

for (int i = 0; i < model()->rowCount(); ++i)
{
height += rowHeight(i);
Expand Down

0 comments on commit d052907

Please sign in to comment.