Fix a potential SQLITE_MISUSE in the .excel command when no database is open.
FossilOrigin-Name: 9b95ff1abfb8d49bbe5a727f5c917a455e4289b4d69196377dc9294409341d70
This commit is contained in:
+3
-1
@@ -4234,7 +4234,9 @@ static void newTempFile(ShellState *p, const char *zSuffix){
|
||||
clearTempFile(p);
|
||||
sqlite3_free(p->zTempFile);
|
||||
p->zTempFile = 0;
|
||||
sqlite3_file_control(p->db, 0, SQLITE_FCNTL_TEMPFILENAME, &p->zTempFile);
|
||||
if( p->db ){
|
||||
sqlite3_file_control(p->db, 0, SQLITE_FCNTL_TEMPFILENAME, &p->zTempFile);
|
||||
}
|
||||
if( p->zTempFile==0 ){
|
||||
sqlite3_uint64 r;
|
||||
sqlite3_randomness(sizeof(r), &r);
|
||||
|
||||
Reference in New Issue
Block a user