diff options
-rw-r--r-- | src/modules/utils/path.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 2d9dcf9c52..2a4bcaa530 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -289,8 +289,11 @@ XCHAR *GetInternalVariable(XCHAR *key, size_t keyLength, MCONTACT hContact) theValue = GetContactNickX(key, hContact);
else if (!_xcscmp(theKey, XSTR(key, "proto")))
theValue = mir_a2x(key, GetContactProto(hContact));
- else if (!_xcscmp(theKey, XSTR(key, "accountname")))
- theValue = mir_a2x(key, _T2A(ProtoGetAccount(GetContactProto(hContact))->tszAccountName));
+ else if (!_xcscmp(theKey, XSTR(key, "accountname"))) {
+ PROTOACCOUNT *acc = ProtoGetAccount(GetContactProto(hContact));
+ if (acc != NULL)
+ theValue = mir_a2x(key, _T2A(acc->tszAccountName));
+ }
else if (!_xcscmp(theKey, XSTR(key, "userid")))
theValue = GetContactIDX(key, hContact);
}
|