]> git.street.me.uk Git - andy/viking.git/blobdiff - test/gpx2gpx.c
Coverity: Fix deference after null checks
[andy/viking.git] / test / gpx2gpx.c
index 15521c5f387ac756738bd30fc420379b47c8a931..e9a6b8aa9d7e8b6334915862118c31462ecff14f 100644 (file)
@@ -4,11 +4,13 @@
 
 int main(int argc, char *argv[])
 {
-  g_type_init ();
-  VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, NULL, 0);
+#if !GLIB_CHECK_VERSION (2, 36, 0)
+  g_type_init();
+#endif
+  VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, FALSE);
   VikTrwLayer *trw = VIK_TRW_LAYER (vl);
   a_gpx_read_file(trw, stdin);
-  a_gpx_write_file(trw, stdout);
+  a_gpx_write_file(trw, stdout, NULL);
   // NB no layer_free functions directly visible anymore
   //  automatically called by layers_panel_finalize cleanup in full Viking program
   return 0;