From e1482daecff877e3b0e22f1fc864e614376cb6b1 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 6 Oct 2020 14:51:21 +0200 Subject: add missing null pointer check It's possible to trigger this case, and the windows variant already has the check. Change-Id: I465fbccb8910bd1b529a2639f34249c18289baa8 --- vcl/skia/x11/gdiimpl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcl/skia/x11') diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx index 9b93a603dc38..d993cf61d8d7 100644 --- a/vcl/skia/x11/gdiimpl.cxx +++ b/vcl/skia/x11/gdiimpl.cxx @@ -140,7 +140,8 @@ void X11SkiaSalGraphicsImpl::performFlush() SkiaZone zone; flushDrawing(); // TODO XPutImage() is somewhat inefficient, XShmPutImage() should be preferred. - mWindowContext->swapBuffers(); + if (mWindowContext) + mWindowContext->swapBuffers(); } std::unique_ptr createVulkanWindowContext(bool temporary) -- cgit