diff --git a/build_port_win.bat b/build_port_win.bat index 94309d7..6196d33 100644 --- a/build_port_win.bat +++ b/build_port_win.bat @@ -1,4 +1,4 @@ @echo off call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" -nmake /f msvc.mk compile_c \ No newline at end of file +nmake /f Makefile compile_c \ No newline at end of file diff --git a/c_src/sqlite3_drv.c b/c_src/sqlite3_drv.c index 8abf0c4..a7f4a34 100644 --- a/c_src/sqlite3_drv.c +++ b/c_src/sqlite3_drv.c @@ -137,7 +137,7 @@ static void stop(ErlDrvData handle) { driver_free(driver_data->prepared_stmts); } sqlite3_close(driver_data->db); - if (driver_data->log) { + if (driver_data->log && (driver_data->log != stderr)) { fclose(driver_data->log); } driver_data->log = NULL;