Skip to content

fix: wayland qtwebeneine application webpage tab close crash #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/quickwidgets/qquickwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ void QQuickWidgetPrivate::invalidateRenderControl()
{
#if QT_CONFIG(opengl)
if (!useSoftwareRenderer) {
if (!context) // this is not an error, could be called before creating the context, or multiple times
QOpenGLContext *current =QOpenGLContext::currentContext();
if (!context || !current) // this is not an error, could be called before creating the context, or multiple times
return;

bool success = context->makeCurrent(offscreenSurface);
Expand Down Expand Up @@ -985,12 +986,12 @@ void QQuickWidgetPrivate::createContext()
// Never called by Software Rendering backend
void QQuickWidgetPrivate::destroyContext()
{
delete offscreenSurface;
offscreenSurface = nullptr;
#if QT_CONFIG(opengl)
delete context;
context = nullptr;
#endif
delete offscreenSurface;
offscreenSurface = nullptr;
}

void QQuickWidget::createFramebufferObject()
Expand Down