From e36071cebf95c1ae5b806c17b259619da32f0e72 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Sep 2012 18:57:47 +0000 Subject: fix for a crash when CrashDumper is started via /svc git-svn-id: http://svn.miranda-ng.org/main/trunk@1637 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/crshdmp.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'plugins/CrashDumper/src/crshdmp.cpp') diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index fcaee71f6b..18f78be3eb 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -248,13 +248,9 @@ static int ModulesLoaded(WPARAM, LPARAM) profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat")); if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) - { - profpath = _T("%miranda_userdata%"); - } + profpath = mir_tstrdup( _T("%miranda_userdata%")); else - { profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%")); - } crs_sntprintf(CrashLogFolder, MAX_PATH, TEXT("%s\\CrashLog"), profpath); crs_sntprintf(VersionInfoFolder, MAX_PATH, TEXT("%s"), profpath); @@ -416,13 +412,9 @@ extern "C" int __declspec(dllexport) Unload(void) DestroyExceptionHandler(); - if (!_tcsstr(profpath, _T("%miranda"))) - { - mir_free(profpath); - } + mir_free(profpath); mir_free(profname); mir_free(vertxt); - return 0; } -- cgit v1.2.3