diff options
Diffstat (limited to 'plugins/Db3x_mmap/src/init.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/init.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index 4938ae9cba..e9810fabe4 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -72,7 +72,7 @@ static MIDatabase* LoadDatabase(const TCHAR *profile) // set the memory, lists & UTF8 manager
mir_getLP( &pluginInfo );
- std::auto_ptr<CDb3Mmap> db( new CDb3Mmap(profile));
+ std::auto_ptr<CDb3Mmap> db(new CDb3Mmap(profile));
if (db->Load(false) != ERROR_SUCCESS)
return NULL;
@@ -90,18 +90,14 @@ static int UnloadDatabase(MIDatabase* db) MIDatabaseChecker* CheckDb(const TCHAR* profile, int *error)
{
std::auto_ptr<CDb3Mmap> db(new CDb3Mmap(profile));
- if (db->Load(false) != ERROR_SUCCESS) {
+ if (db->Load(true) != ERROR_SUCCESS) {
*error = EGROKPRF_CANTREAD;
return NULL;
}
- int chk = db->CheckDbHeaders();
- if (chk != ERROR_SUCCESS) {
- *error = chk;
+ if (*error = db->PrepareCheck())
return NULL;
- }
- *error = 0;
return db.release();
}
|