Skip to content

Commit

Permalink
Fix crash if system tray is suddenly unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Sep 2, 2017
1 parent 869d497 commit d10bcd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ void MainWindow::updateIcon()
m_tray->setIcon(icon);

// WORKAROUND: Tray icon sometimes pixelated on high DPI displays.
if ( icon.name().startsWith("copyq-") ) {
if ( QSystemTrayIcon::isSystemTrayAvailable() && icon.name().startsWith("copyq-") ) {
const auto size = m_tray->geometry().size();
if ( size.isValid() )
m_tray->setIcon( icon.pixmap(size) );
Expand Down

0 comments on commit d10bcd9

Please sign in to comment.