diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-04-27 09:32:02 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-04-27 09:32:02 +0000 |
commit | 1273b126536581cc9710bed760ab60a82946e857 (patch) | |
tree | b6baa262bbde938d673bcc8319d11095e85fb207 /plugins/SmileyAdd/src | |
parent | 47f4d5c03a16988eab91de5e26218f8e0d35b8b8 (diff) |
SmileyAdd: crashfix
git-svn-id: http://svn.miranda-ng.org/main/trunk@13195 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src')
-rw-r--r-- | plugins/SmileyAdd/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/services.cpp | 3 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index af5ec53ac5..7ce4e8ec15 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -344,7 +344,7 @@ void OptionsDialogType::UpdateVisibleSmPackList(void) CMString FileName;
if (!ProtoName.IsEmpty()) {
PhysProtoName += ProtoName;
- FileName = tmpsmcat.GetSmileyCategory(PhysProtoName)->GetFilename();
+ FileName = tmpsmcat.GetSmileyCategory(PhysProtoName) ? tmpsmcat.GetSmileyCategory(PhysProtoName)->GetFilename() : _T("");
if (FileName.IsEmpty())
visible = true;
}
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index a250bf10bb..1ab16d58b6 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -54,7 +54,8 @@ SmileyPackType* GetSmileyPack(const char* proto, MCONTACT hContact, SmileyPackCT categoryName = _T("AllProto");
categoryName += dbv.ptszVal;
db_free(&dbv);
- if (g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename().IsEmpty())
+ CMString categoryFileName = g_SmileyCategories.GetSmileyCategory(categoryName) ? g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename() : _T("");
+ if (categoryFileName.IsEmpty())
categoryName = A2T_SM(protonam);
}
else
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index c2a18de08f..10ca0bc2dd 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -845,7 +845,7 @@ void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStr }
if (!PhysProtoName.IsEmpty())
- paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename();
+ paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName) ? g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename() : _T("");
if (paths.IsEmpty()){
const char* packnam = acc->szProtoName;
|