aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-08 09:07:07 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-08 16:18:24 +0000
commitac9276eeb9e2dd31345600a497c4d65009ae9577 (patch)
tree30dbf42483feb5e86e1b7fcd9b0b1cc34c23b352 /src/qml/jsruntime/qv4script_p.h
parent7d9f4320533026c9ee9378412d58b9709b018d74 (diff)
Avoid crashing when not having a screen for the context
Disconnecting the screen to which the context belongs results in a null QOpenGLContext::screen(). Fall back to qguiapp's devicePixelRatio() in this case (giving the highest dpi in the system) due to the lack of any other option. This will fix the crashes when rendering offscreen (QQuickWidget) and using native text rendering. Without this the render attempt after disconnecting the screen with which the context was created would crash due to accessing the already destroyed screen instance. Task-number: QTBUG-42803 Change-Id: Ie5889f59e5d66d09329b3d5fb8e1365d14d5b8fc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/qml/jsruntime/qv4script_p.h')
0 files changed, 0 insertions, 0 deletions