Fossil SCM
Avoid attempting to preserve the default VFS if it has not been set.
Commit
fffcf60cbc34bbbf775cfd7ae079c95efc65afab
Parent
aa22b1b46285a9f…
1 file changed
+1
-1
+1
-1
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -155,9 +155,9 @@ | ||
| 155 | 155 | /* |
| 156 | 156 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 157 | 157 | ** to load the name and database connection for the open Fossil database. |
| 158 | 158 | */ |
| 159 | 159 | void fossil_open(const char **pzRepoName){ |
| 160 | - sqlite3_vfs_register(pDefaultVfs, 1); | |
| 160 | + if( pDefaultVfs ) sqlite3_vfs_register(pDefaultVfs, 1); | |
| 161 | 161 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 162 | 162 | *pzRepoName = g.zRepositoryName; |
| 163 | 163 | } |
| 164 | 164 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -155,9 +155,9 @@ | |
| 155 | /* |
| 156 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 157 | ** to load the name and database connection for the open Fossil database. |
| 158 | */ |
| 159 | void fossil_open(const char **pzRepoName){ |
| 160 | sqlite3_vfs_register(pDefaultVfs, 1); |
| 161 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 162 | *pzRepoName = g.zRepositoryName; |
| 163 | } |
| 164 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -155,9 +155,9 @@ | |
| 155 | /* |
| 156 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 157 | ** to load the name and database connection for the open Fossil database. |
| 158 | */ |
| 159 | void fossil_open(const char **pzRepoName){ |
| 160 | if( pDefaultVfs ) sqlite3_vfs_register(pDefaultVfs, 1); |
| 161 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 162 | *pzRepoName = g.zRepositoryName; |
| 163 | } |
| 164 |