aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index f743453b9..c6f623f5b 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -8975,11 +8975,11 @@ static int do_meta_command(char *zLine, ShellState *p){
/* If a filename is specified, try to open it first */
if( zFN || p->openMode==SHELL_OPEN_HEXDB ){
- if( newFlag && !p->bSafeMode ) shellDeleteFile(zNewFilename);
+ if( newFlag && zFN && !p->bSafeMode ) shellDeleteFile(zFN);
if( p->bSafeMode
&& p->openMode!=SHELL_OPEN_HEXDB
- && zNewFilename
- && strcmp(zNewFilename,":memory:")!=0
+ && zFN
+ && strcmp(zFN,":memory:")!=0
){
failIfSafeMode(p, "cannot open disk-based database files in safe mode");
}