diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-17 15:42:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-17 15:42:14 +0000 |
commit | d6964f7bb1c2afc8d67905fa38ac9a3df766b807 (patch) | |
tree | c1faf62ec8a37d184fce91df7fc07243ec738f5d /src/mir_core | |
parent | 69f3e7d05fcdab94dc78e52af620d46191fafb37 (diff) |
obsolete services extincted
git-svn-id: http://svn.miranda-ng.org/main/trunk@14237 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/path.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mir_core/src/path.cpp b/src/mir_core/src/path.cpp index 6e17eaa53a..e9fb81c672 100644 --- a/src/mir_core/src/path.cpp +++ b/src/mir_core/src/path.cpp @@ -83,6 +83,9 @@ MIR_CORE_DLL(int) PathToAbsolute(const char *pSrc, char *pOut, const char *base) MIR_CORE_DLL(void) CreatePathToFile(char *szFilePath)
{
+ if (szFilePath == NULL)
+ return;
+
char *pszLastBackslash = strrchr(szFilePath, '\\');
if (pszLastBackslash == NULL)
return;
@@ -94,6 +97,9 @@ MIR_CORE_DLL(void) CreatePathToFile(char *szFilePath) MIR_CORE_DLL(int) CreateDirectoryTree(const char *szDir)
{
+ if (szDir == NULL)
+ return 1;
+
char szTestDir[MAX_PATH];
mir_strncpy(szTestDir, szDir, SIZEOF(szTestDir));
@@ -167,6 +173,9 @@ MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, const WCHAR *b MIR_CORE_DLL(void) CreatePathToFileW(WCHAR *wszFilePath)
{
+ if (wszFilePath == NULL)
+ return;
+
WCHAR *pszLastBackslash = wcsrchr(wszFilePath, '\\');
if (pszLastBackslash == NULL)
return;
@@ -178,6 +187,9 @@ MIR_CORE_DLL(void) CreatePathToFileW(WCHAR *wszFilePath) MIR_CORE_DLL(int) CreateDirectoryTreeW(const WCHAR *szDir)
{
+ if (szDir == NULL)
+ return 1;
+
WCHAR szTestDir[MAX_PATH];
mir_wstrncpy(szTestDir, szDir, SIZEOF(szTestDir));
|