Skip to content

Commit d94f127

Browse files
committed
FIX: More
1 parent c7155e4 commit d94f127

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

mne/viz/backends/_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def _init_mne_qtapp(enable_icon=True, pg_app=False, splash=False):
193193
out = app
194194
if splash:
195195
pixmap = QPixmap(f"{icons_path}/mne_splash.png")
196-
pixmap.setDevicePixelRatio(QGuiApplication.primaryScreen().devicePixelRatio())
196+
screen = QGuiApplication.primaryScreen()
197+
ratio = screen.devicePixelRatio() if screen else 1
198+
pixmap.setDevicePixelRatio(ratio)
197199
args = (pixmap,)
198200
if _should_raise_window():
199201
args += (Qt.WindowStaysOnTopHint,)

0 commit comments

Comments
 (0)