summaryrefslogtreecommitdiff
path: root/plugins/FloatingContacts/src/filedrop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FloatingContacts/src/filedrop.cpp')
-rw-r--r--plugins/FloatingContacts/src/filedrop.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/FloatingContacts/src/filedrop.cpp b/plugins/FloatingContacts/src/filedrop.cpp
index 64ee8db693..586b1419aa 100644
--- a/plugins/FloatingContacts/src/filedrop.cpp
+++ b/plugins/FloatingContacts/src/filedrop.cpp
@@ -176,16 +176,20 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb )
char **ppFiles = ( char** )malloc( sizeof( char *)* ( nFilesCount+1));
- if ( ppFiles == NULL )
+ BOOL bSuccess = FALSE;
+ if (ppFiles != NULL)
{
- return FALSE;
- }
-
- ppFiles[ nFilesCount] = NULL;
+ ppFiles[nFilesCount] = NULL;
+
+ ProcessDroppedItems(ppDroppedItems, nDroppedItemsCount, ppFiles);
+
+ bSuccess = (BOOL)CallService(MS_CLIST_CONTACTFILESDROPPED, (WPARAM)pThumb->hContact, (LPARAM)ppFiles);
- ProcessDroppedItems( ppDroppedItems, nDroppedItemsCount, ppFiles );
+ for (UINT iItem = 0; iItem < nFilesCount ; ++iItem )
+ free(ppFiles[iItem]);
- BOOL bSuccess = (BOOL)CallService(MS_CLIST_CONTACTFILESDROPPED, (WPARAM)pThumb->hContact, (LPARAM)ppFiles );
+ free(ppFiles);
+ }
// Cleanup
for (UINT iItem = 0; ppDroppedItems[ iItem ]; ++iItem )
@@ -195,13 +199,6 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb )
free( ppDroppedItems );
- for (UINT iItem = 0; iItem < nFilesCount ; ++iItem )
- {
- free( ppFiles[ iItem ] );
- }
-
- free( ppFiles );
-
return bSuccess;
}