summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-09-01 10:19:18 +0200
committerAlessandro Bono <alessandro.bono369@gmail.com>2022-10-29 12:39:50 +0200
commit0c38efe8d97f20bb004e9f9177113a73856ff54b (patch)
tree2fba41b6f367dc3c3ecd87000a793b6109a625b5 /daemon
parentf50a932d4a7302efcd3ec5b883f527c32b8c912c (diff)
downloadgdm-0c38efe8d97f20bb004e9f9177113a73856ff54b.tar.gz
gdm-server: Add missing guards in public functions
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 451858a7..ebd0a78b 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -752,6 +752,8 @@ gdm_server_start (GdmServer *server)
GError *local_error = NULL;
GError **error = &local_error;
+ g_return_val_if_fail (GDM_IS_SERVER (server), FALSE);
+
/* Hardcode the VT for the initial X server, but nothing else */
if (server->is_initial) {
vtarg = "vt" G_STRINGIFY (GDM_INITIAL_VT);
@@ -802,6 +804,8 @@ gdm_server_stop (GdmServer *server)
{
int res;
+ g_return_val_if_fail (GDM_IS_SERVER (server), FALSE);
+
if (server->pid <= 1) {
return TRUE;
}