Fix the geopoly_svg() function so that it returns NULL when given zero

arguments.

FossilOrigin-Name: 120cb1768338eb86412fb69d4c7677247775bb37875ab3a98766cffd535f04cf
This commit is contained in:
drh
2019-01-03 00:44:03 +00:00
parent 8fc4a11c94
commit 232f278084
3 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -395,7 +395,9 @@ static void geopolySvgFunc(
int argc,
sqlite3_value **argv
){
GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
GeoPoly *p;
if( argc<1 ) return;
p = geopolyFuncParam(context, argv[0], 0);
if( p ){
sqlite3 *db = sqlite3_context_db_handle(context);
sqlite3_str *x = sqlite3_str_new(db);