summaryrefslogtreecommitdiff
path: root/plugins/Dbx_tree/src/DatabaseLink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_tree/src/DatabaseLink.cpp')
-rw-r--r--plugins/Dbx_tree/src/DatabaseLink.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Dbx_tree/src/DatabaseLink.cpp b/plugins/Dbx_tree/src/DatabaseLink.cpp
index cc944cc305..8c99052eb6 100644
--- a/plugins/Dbx_tree/src/DatabaseLink.cpp
+++ b/plugins/Dbx_tree/src/DatabaseLink.cpp
@@ -65,9 +65,9 @@ Returns: 0 on success, nonzero on failure
static MIDatabase* LoadDatabase(const TCHAR *profile)
{
- gDataBase = new CDataBase(profile);
- gDataBase->OpenDB();
- return gDataBase;
+ CDataBase* pDb = new CDataBase(profile);
+ pDb->OpenDB();
+ return pDb;
}
/*
@@ -78,8 +78,6 @@ Note: Unload() might be called even if Load(void) was never called, wasLoaded is
static int UnloadDatabase(MIDatabase* db)
{
- if (gDataBase == db)
- gDataBase = NULL;
delete (CDataBase*)db;
return 0;
}