summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-11-04 14:52:06 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-11-04 14:52:06 +0000
commit5255e872971f24de03b256de2d6dfd9cd0aab159 (patch)
treeb9b74cd5fe62ad6fc9e11ee056866d31a6bfb7a3
parentfb4c884885e546515a88f0ab644482fe373704ef (diff)
- forgotten mir_free
- warning message when we cannot retrieve path setting (this should never happen oO) git-svn-id: http://svn.miranda-ng.org/main/trunk@2182 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 5b855c7972..393406a91e 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -354,12 +354,18 @@ LPTSTR GetCustomPath() {
mir_freeAndNil(pszPath);
pszPath = mir_tstrdup(szPath);
}
+ if(pszPath == NULL)
+ {
+ MessageBox(NULL, _T("Can not retrieve Screenshot path."), _T("Send Screenshot"), MB_OK | MB_ICONERROR | MB_APPLMODAL);
+ return 0;
+ }
INT_PTR result = CallService(MS_UTILS_CREATEDIRTREET,0,(LPARAM) pszPath);
if(result != NULL)
{
TCHAR szError[MAX_PATH];
mir_sntprintf(szError,MAX_PATH,TranslateT("Could not create Screenshot folder (error code: %d):\n%s\nDo you have write permissions?"),result,pszPath);
MessageBox(NULL, szError, _T("Send Screenshot"), MB_OK | MB_ICONERROR | MB_APPLMODAL);
+ mir_free(pszPath);
return 0;
}
return pszPath;