From 197ff990fbf4ae6c4ba3f5635f18d44dab83de00 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Fri, 24 May 2024 08:24:28 +1000 Subject: Bug [#2439]. Prevent warnings in log from unreferencing NULL cursor. --- gtk/PlatGTK.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index e7d6abd3d..563fa9c81 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1353,7 +1353,8 @@ void Window::SetCursor(Cursor curs) { if (WindowFromWidget(PWidget(wid))) gdk_window_set_cursor(WindowFromWidget(PWidget(wid)), gdkCurs); - UnRefCursor(gdkCurs); + if (gdkCurs) + UnRefCursor(gdkCurs); } /* Returns rectangle of monitor pt is on, both rect and pt are in Window's -- cgit v1.2.3