2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Alpha 1.0.20: fix crash in old Windows versions.

A shell32 method SHCreateItemFromParsingName was used without
checking if it was successfully loaded from shell32.dll (Vista+).
This commit is contained in:
John Preston
2017-03-09 00:10:32 +03:00
parent 5aab168b3e
commit ee45bbe4c6
2 changed files with 7 additions and 8 deletions

View File

@@ -84,9 +84,6 @@ using namespace Platform;
namespace {
QStringList _initLogs;
bool useOpenWith = false;
bool useOpenAs = false;
bool useShellapi = false;
bool themeInited = false;
bool finished = true;
QMargins simpleMargins, margins;
@@ -96,10 +93,6 @@ namespace {
public:
_PsInitializer() {
Dlls::start();
useOpenWith = (Dlls::SHAssocEnumHandlers != nullptr) && (Dlls::SHCreateItemFromParsingName != nullptr);
useOpenAs = (Dlls::SHOpenWithDialog != nullptr) || (Dlls::OpenAs_RunDLL != nullptr);
useShellapi = (Dlls::SHQueryUserNotificationState != nullptr);
}
};
_PsInitializer _psInitializer;