From 1b0e73ba6609a8f9fc35f417f6fc0fc494ebd9fc Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Fri, 1 Jul 2011 09:33:28 +0000 Subject: [PATCH] Fix #1080: cunit is crashing on test_ShpDumerDestroy(). Looks like the original code omitted to set the default config values causing the addition of a ShpDumperDestroy() call to fall over on some platforms due to uninitialised pointers. git-svn-id: http://svn.osgeo.org/postgis/trunk@7533 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/cunit/cu_pgsql2shp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loader/cunit/cu_pgsql2shp.c b/loader/cunit/cu_pgsql2shp.c index 261a8626c..3d0264e80 100644 --- a/loader/cunit/cu_pgsql2shp.c +++ b/loader/cunit/cu_pgsql2shp.c @@ -66,9 +66,10 @@ int clean_pgsql2shp_suite(void) void test_ShpDumperCreate(void) { config = (SHPDUMPERCONFIG*)calloc(1, sizeof(SHPDUMPERCONFIG)); + set_config_defaults(config); state = ShpDumperCreate(config); CU_ASSERT_PTR_NOT_NULL(state); - CU_ASSERT_EQUAL(state->outtype, 's'); + CU_ASSERT_EQUAL(state->config->fetchsize, 100); } void test_ShpDumperDestroy(void) -- 2.50.1