Fossil SCM

Avoid attempting to preserve the default VFS if it has not been set.

mistachkin 2013-12-10 21:15 trunk
Commit fffcf60cbc34bbbf775cfd7ae079c95efc65afab
1 file changed +1 -1
+1 -1
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -155,9 +155,9 @@
155155
/*
156156
** This routine is called by the patched sqlite3 command-line shell in order
157157
** to load the name and database connection for the open Fossil database.
158158
*/
159159
void fossil_open(const char **pzRepoName){
160
- sqlite3_vfs_register(pDefaultVfs, 1);
160
+ if( pDefaultVfs ) sqlite3_vfs_register(pDefaultVfs, 1);
161161
sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
162162
*pzRepoName = g.zRepositoryName;
163163
}
164164
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button