gdk/wayland: Clear GdkWaylandMonitor::output using g_clear_pointer()
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>
Tue, 22 Nov 2022 09:23:08 +0000 (11:23 +0200)
committerVlad Zahorodnii <vlad.zahorodnii@kde.org>
Tue, 22 Nov 2022 09:23:08 +0000 (11:23 +0200)
Use g_clear_pointer() to make tear down code consistent.

gdk/wayland/gdkmonitor-wayland.c

index 050211314583b42822c6e27882ad5a6f664eefca..b4523e016e3b0658ca97900c9fffa677b441a807 100644 (file)
@@ -48,7 +48,7 @@ gdk_wayland_monitor_finalize (GObject *object)
   g_free (monitor->name);
 
   g_clear_pointer (&monitor->xdg_output, zxdg_output_v1_destroy);
-  wl_output_destroy (monitor->output);
+  g_clear_pointer (&monitor->output, wl_output_destroy);
 
   G_OBJECT_CLASS (gdk_wayland_monitor_parent_class)->finalize (object);
 }