Critical warning because the cursor may be null
Under Wayland, when capturing fullscreen screenshots, the following error happens because the cursor can be NULL:
Core was generated by `/usr/local/bin/xfce4-screenshooter'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 g_logv (log_domain=0x7798a87fc015 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffc575290b0) at ../glib/glib/gmessages.c:1277
1277 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
[Current thread is 1 (Thread 0x7798a71dda00 (LWP 14807))]
(gdb) bt
#0 g_logv (log_domain=0x7798a87fc015 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffc575290b0) at ../glib/glib/gmessages.c:1277
#1 0x00007798a86cc734 in g_log (log_domain=log_domain@entry=0x7798a87fc015 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7798a878a26a "%s: assertion '%s' failed")
at ../glib/glib/gmessages.c:1315
#2 0x00007798a86cd8de in g_return_if_fail_warning
(log_domain=log_domain@entry=0x7798a87fc015 "GLib-GObject", pretty_function=pretty_function@entry=0x7798a8806f98 <__func__.26.lto_priv.0> "g_object_unref", expression=expression@entry=0x7798a87fe921 "G_IS_OBJECT (object)") at ../glib/glib/gmessages.c:3000
#3 0x00007798a87da655 in g_object_unref (_object=_object@entry=0x0) at ../glib/gobject/gobject.c:4287
#4 0x0000563d5231c6f0 in screenshooter_actions_dialog_new (sd=0x563d52d106f0) at lib/screenshooter-dialogs.c:1375
#5 0x0000563d523195e5 in action_idle (user_data=0x563d52d106f0) at lib/screenshooter-actions.c:51
#6 0x00007798a86c7179 in g_main_dispatch (context=0x563d52a6c350) at ../glib/glib/gmain.c:3344
#7 0x00007798a872639f in g_main_context_dispatch_unlocked (context=0x563d52a6c350) at ../glib/glib/gmain.c:4152
#8 g_main_context_iterate_unlocked.isra.0 (context=0x563d52a6c350, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
#9 0x00007798a86c7da7 in g_main_loop_run (loop=0x563d52d78270) at ../glib/glib/gmain.c:4419
#10 0x00007798a91ed2bf in gtk_main () at ../gtk/gtk/gtkmain.c:1329
#11 0x0000563d5231b83b in screenshooter_region_dialog_show (sd=<optimized out>, plugin=<optimized out>) at lib/screenshooter-dialogs.c:878
#12 0x0000563d5231937a in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:349