diff --git a/src/wrap.c b/src/wrap.c
index b39764016ad9e3acb10d0e58371ae527b71b2425..a4e4bda5ab6859bb936aefba7346e019fc22afb4 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -1612,7 +1612,7 @@ int
 main (int argc,
       char *argv[])
 {
-  g_autoptr(GOptionContext) context;
+  g_autoptr(GOptionContext) context = NULL;
   g_autoptr(GError) local_error = NULL;
   GError **error = &local_error;
   int ret = 2;