summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-13 20:48:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-14 09:52:58 +0200
commitfb098c51e731ab92198db9822d4de757469ee804 (patch)
tree421a166ce6b361d17cc2e90e79389c3d482157a5
parent9b5dad13b56bdde7c40970351af3da3a2c3c9350 (diff)
Related: tdf#124729 check error status before continuing
Change-Id: Ic39e569121b2646995b8dec50c3941db65fdd500 Reviewed-on: https://gerrit.libreoffice.org/80745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 38fc905c8091..d050f624797c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1472,7 +1472,12 @@ private:
GdkWindow *pWindow = gtk_widget_get_window(pParent);
m_pContext = gdk_window_create_gl_context(pWindow, nullptr);
- gdk_gl_context_realize(m_pContext, nullptr);
+ if (!m_pContext)
+ return false;
+
+ if (!gdk_gl_context_realize(m_pContext, nullptr))
+ return false;
+
gdk_gl_context_make_current(m_pContext);
glGenFramebuffersEXT(1, &m_nFrameBuffer);
glGenRenderbuffersEXT(1, &m_nRenderBuffer);