diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-26 17:39:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-26 17:39:27 +0000 |
commit | 0ae0d8793303452256f70946428a7f51466a60af (patch) | |
tree | f4c5dcbcd9ffde65aaaf9f119adc77891f2c5471 /plugins/Db3x_mmap/src/dbsettings.cpp | |
parent | dbbf4f80b0774a3880989458cd1519e29e959f54 (diff) |
fix against crash while opening read-only databases
git-svn-id: http://svn.miranda-ng.org/main/trunk@7910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbsettings.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbsettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 29e92eb393..18d14fa7ab 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -357,7 +357,7 @@ STDMETHODIMP_(BOOL) CDb3Base::SetSettingResident(BOOL bIsResident, const char *p STDMETHODIMP_(BOOL) CDb3Base::WriteContactSetting(HANDLE hContact, DBCONTACTWRITESETTING *dbcws)
{
- if (dbcws == NULL || dbcws->szSetting == NULL || dbcws->szModule == NULL)
+ if (dbcws == NULL || dbcws->szSetting == NULL || dbcws->szModule == NULL || m_bReadOnly)
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
|