Skip to content

Commit

Permalink
fix: init icon size is not normal due to missing null check
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Sep 30, 2024
1 parent 3770202 commit e7fcda6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,10 @@ Class load()

c.showingDictBarNames = ( root.namedItem( "showingDictBarNames" ).toElement().text() == "1" );

c.usingToolbarsIconSize =
( static_cast< ToolbarsIconSize >( root.namedItem( "usingToolbarsIconSize" ).toElement().text().toInt() ) );
QDomNode usingToolbarsIconSize = root.namedItem( "usingToolbarsIconSize" );
if ( !usingToolbarsIconSize.isNull() ) {
c.usingToolbarsIconSize = static_cast< ToolbarsIconSize >( usingToolbarsIconSize.toElement().text().toInt() );
}

if ( !root.namedItem( "historyExportPath" ).isNull() )
c.historyExportPath = root.namedItem( "historyExportPath" ).toElement().text();
Expand Down

0 comments on commit e7fcda6

Please sign in to comment.