Skip to content

Commit 4d4bb96

Browse files
committed
fix: macos safer screen resolving
1 parent abe12d6 commit 4d4bb96

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

labeless_ida/pysignaturetooltip.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ void PySignatureToolTip::showText(const QString& text, const QPoint& pos)
9494
#elif defined(Q_OS_MACOS) || defined(Q_WS_MAC)
9595
QScreen* scr = QGuiApplication::screenAt(pos);
9696
if (!scr) {
97-
if (auto window = parentWidget()->window()) {
98-
scr = window->screen();
97+
auto pw = parentWidget();
98+
if (pw && pw->window()) {
99+
scr = pw->window()->screen();
99100
}
100101
else
101102
{

0 commit comments

Comments
 (0)