summaryrefslogtreecommitdiff
path: root/src/gameinfoimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gameinfoimpl.cpp')
-rw-r--r--src/gameinfoimpl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp
index 979e6c8d..98b0fddf 100644
--- a/src/gameinfoimpl.cpp
+++ b/src/gameinfoimpl.cpp
@@ -63,20 +63,20 @@ QString GetAppVersion(std::wstring const &app_name)
DWORD info_len = ::GetFileVersionInfoSizeW(app_name.c_str(), &handle);
if (info_len == 0) {
qDebug("GetFileVersionInfoSizeW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
std::vector<char> buff(info_len);
if( ! ::GetFileVersionInfoW(app_name.c_str(), handle, info_len, buff.data())) {
qDebug("GetFileVersionInfoW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
VS_FIXEDFILEINFO *pFileInfo;
UINT buf_len;
if ( ! ::VerQueryValueW(buff.data(), L"\\", reinterpret_cast<LPVOID *>(&pFileInfo), &buf_len)) {
qDebug("VerQueryValueW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
return QString("%1.%2.%3.%4").arg(HIWORD(pFileInfo->dwFileVersionMS))
.arg(LOWORD(pFileInfo->dwFileVersionMS))