diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-27 19:53:42 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-27 19:53:42 +0000 |
commit | bc62befe65f4ff950bb192d703fb38a9336d5a51 (patch) | |
tree | 3e35c0e41d6d432ec7777e55146dfe4762e4980e /plugins/NewXstatusNotify | |
parent | b46bef90db51429f108bef5fc4872ad31932ea78 (diff) |
NewXstatusNotify
crash fix (patch wishmaster)
git-svn-id: http://svn.miranda-ng.org/main/trunk@200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/options.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/NewXstatusNotify/options.cpp b/plugins/NewXstatusNotify/options.cpp index 51cc48e432..f78ff9ea04 100644 --- a/plugins/NewXstatusNotify/options.cpp +++ b/plugins/NewXstatusNotify/options.cpp @@ -114,13 +114,16 @@ void SaveTemplates() DBWriteContactSettingTString(0, MODULE, "TLogOpening", templates.LogOpening);
DBWriteContactSettingByte(0, MODULE, "TPopupFlags", templates.PopupFlags);
DBWriteContactSettingByte(0, MODULE, "TLogFlags", templates.LogFlags);
- for (int i = 0; i < ProtoTemplates->realCount; i++)
+ if(ProtoTamplates!=NULL)
{
- PROTOTEMPLATE *prototemplate = (PROTOTEMPLATE *)ProtoTemplates->items[i];
- TCHAR str[MAX_PATH];
- mir_sntprintf(str, SIZEOF(str), _T("%s_TSMChange"), prototemplate->ProtoName);
- char *szstr = mir_t2a(str);
- DBWriteContactSettingTString(0, MODULE, szstr, prototemplate->ProtoTemplate);
+ for (int i = 0; i < ProtoTemplates->realCount; i++)
+ {
+ PROTOTEMPLATE *prototemplate = (PROTOTEMPLATE *)ProtoTemplates->items[i];
+ TCHAR str[MAX_PATH];
+ mir_sntprintf(str, SIZEOF(str), _T("%s_TSMChange"), prototemplate->ProtoName);
+ char *szstr = mir_t2a(str);
+ DBWriteContactSettingTString(0, MODULE, szstr, prototemplate->ProtoTemplate);
+ }
}
}
|