diff options
| author | Tannin <devnull@localhost> | 2015-05-11 21:41:00 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-05-11 21:41:00 +0200 |
| commit | 183b5715609b309431d8040101635ef9ac0843bf (patch) | |
| tree | 655c29284abc00a3cb0485f246b80b23c4d61995 /src/mainwindow.cpp | |
| parent | 0f1271dd991ba9d67181114f75c80e14e8bfd596 (diff) | |
minor stuff
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 135bdf8c..5a2ef6fd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1681,8 +1681,11 @@ static HRESULT CreateShortcut(LPCWSTR targetFileName, LPCWSTR arguments, result = shellLink->QueryInterface(IID_IPersistFile, (LPVOID*)&persistFile);
if (SUCCEEDED(result)) {
wchar_t linkFileNameW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, linkFileName, -1, linkFileNameW, MAX_PATH);
- result = persistFile->Save(linkFileNameW, TRUE);
+ if (MultiByteToWideChar(CP_ACP, 0, linkFileName, -1, linkFileNameW, MAX_PATH) > 0) {
+ result = persistFile->Save(linkFileNameW, TRUE);
+ } else {
+ qCritical("failed to create link: %s", linkFileName);
+ }
persistFile->Release();
} else {
qCritical("failed to create IPersistFile instance");
|
