Skip to content

Commit

Permalink
fix: crash on treeland
Browse files Browse the repository at this point in the history
  • Loading branch information
wineee committed Dec 6, 2024
1 parent 9d2f4fe commit 35c4d40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,11 @@ QString MainWindow::getConfigWindowState()
QString windowState =
Settings::instance()->settings->option("advanced.window.use_on_starting")->value().toString();

if (!screen) {
qCritical() << "Can't get the screen where the cursor is located!";
return QSize(0 ,0);
}

// 启动参数配置的状态值优先于 内部配置的状态值
if (m_properties.contains(StartWindowState)) {
QString state = m_properties[StartWindowState].toString();
Expand Down

0 comments on commit 35c4d40

Please sign in to comment.