Qt5: fixed crash when calling stretchBlt() on invisible form. issue #39780

(cherry picked from commit 7568b05082)
This commit is contained in:
Željan Rikalo 2022-06-14 10:04:08 +02:00 committed by Maxim Ganetsky
parent 8897c24ed6
commit 9f9f4cb2ad

View File

@ -7023,12 +7023,12 @@ begin
begin
if SrcQDC.Parent <> nil then
begin
AWidgetID := QWidget_winId(SrcQDC.Parent);
AWindow := QWidget_windowHandle(SrcQDC.Parent);
if AWindow <> nil then
AScreen := QWindow_screen(AWindow)
else
AScreen := QGuiApplication_primaryScreen();
if AWindow = nil then
exit(False);
AWidgetID := QWindow_winId(AWindow);
AScreen := QWindow_screen(AWindow);
if (Rop = SRCCOPY) and not ((DstRect.Right < DstRect.Left) or (DstRect.Bottom < DstRect.Top)) then
begin