We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 401f342 commit 5d5b396Copy full SHA for 5d5b396
1 file changed
output-gazetteer.c
@@ -207,7 +207,7 @@ static void copy_error_data(const char *sql)
207
{
208
unsigned int sqlLen = strlen(sql);
209
210
-fprintf(hLog, "%s", sql);
+ if (hLog) fprintf(hLog, "%s", sql);
211
212
/* Make sure we have an active copy */
213
if (!CopyErrorActive)
@@ -1025,7 +1025,7 @@ static void gazetteer_out_stop(void)
1025
/* Stop any active copy */
1026
stop_copy();
1027
//stop_error_copy();
1028
- fclose(hLog);
+ if (hLog) fclose(hLog);
1029
1030
/* Commit transaction */
1031
pgsql_exec(Connection, PGRES_COMMAND_OK, "COMMIT");
0 commit comments