Don't send OpenGL initialization crash reports.

This commit is contained in:
John Preston 2021-06-14 11:22:39 +04:00
parent 37f59095f4
commit 3b1aa55d21
3 changed files with 12 additions and 3 deletions

View file

@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/launcher.h"
#include "core/sandbox.h"
#include "core/update_checker.h"
#include "core/ui_integration.h"
#include "window/main_window.h"
#include "platform/platform_specific.h"
#include "base/zlib_help.h"
@ -252,7 +253,11 @@ LastCrashedWindow::LastCrashedWindow(
, _launch(std::move(launch)) {
excludeReportUsername();
if (!cInstallBetaVersion() && !cAlphaVersion()) { // currently accept crash reports only from testers
if (!cInstallBetaVersion() && !cAlphaVersion()) {
// Currently accept crash reports only from testers.
_sendingState = SendingNoReport;
} else if (Core::OpenGLLastCheckFailed()) {
// Nothing we can do right now with graphics driver crashes in GL.
_sendingState = SendingNoReport;
}
if (_sendingState != SendingNoReport) {

View file

@ -120,7 +120,7 @@ void UiIntegration::openglCheckFinish() {
}
bool UiIntegration::openglLastCheckFailed() {
return QFile::exists(OpenGLCheckFilePath());
return OpenGLLastCheckFailed();
}
void UiIntegration::textActionsUpdated() {
@ -320,4 +320,8 @@ QString UiIntegration::phraseFormattingMonospace() {
return tr::lng_menu_formatting_monospace(tr::now);
}
bool OpenGLLastCheckFailed() {
return QFile::exists(OpenGLCheckFilePath());
}
} // namespace Core

View file

@ -75,6 +75,6 @@ public:
};
[[nodiscard]] bool OpenglLastCheckFailed();
[[nodiscard]] bool OpenGLLastCheckFailed();
} // namespace Core