diff options
-rw-r--r-- | protocols/IcqOscarJ/src/icq_avatar.cpp | 12 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/version.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index 96020d9437..b5f49ee611 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -555,7 +555,8 @@ int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid, for (avatars_request *ar = m_avatarsQueue; ar; ar = ar->pNext) {
if (ar->hContact == hContact && ar->type == ART_BLOCK) { // found a block item
if (GetTickCount() > ar->timeOut) { // remove timeouted block
- ar = ReleaseAvatarRequestInQueue(ar);
+ if ((ar = ReleaseAvatarRequestInQueue(ar)) == NULL)
+ break;
continue;
}
m_avatarsMutex->Leave();
@@ -581,11 +582,11 @@ int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid, // we failed to send request, or avatar thread not ready
// check if any request for this user is not already in the queue
- avatars_request *ar = m_avatarsQueue;
- while (ar) {
+ for (avatars_request *ar = m_avatarsQueue; ar; ar = ar->pNext) {
if (ar->hContact == hContact) { // we found it, return error
if (ar->type == ART_BLOCK && GetTickCount() > ar->timeOut) { // remove timeouted block
- ar = ReleaseAvatarRequestInQueue(ar);
+ if ((ar = ReleaseAvatarRequestInQueue(ar)) == NULL)
+ break;
continue;
}
m_avatarsMutex->Leave();
@@ -595,11 +596,10 @@ int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid, requestAvatarConnection();
return 0;
}
- ar = ar->pNext;
}
// add request to queue, processed after successful login
- ar = new avatars_request(ART_GET); // get avatar
+ avatars_request *ar = new avatars_request(ART_GET); // get avatar
if (!ar) { // out of memory, go away
m_avatarsMutex->Leave();
return 0;
diff --git a/protocols/IcqOscarJ/src/version.h b/protocols/IcqOscarJ/src/version.h index c3cf0026fb..0030e8609b 100644 --- a/protocols/IcqOscarJ/src/version.h +++ b/protocols/IcqOscarJ/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
#define __RELEASE_NUM 2
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#include <stdver.h>
|