[gtk/wip/baedert/radial-gradient: 1/5] gl renderer: Set an error if we don't have one already




commit 85c2428b13c834199d13c20a2262bdc91726abcc
Author: Timm Bäder <mail baedert org>
Date:   Wed Sep 16 05:57:11 2020 +0200

    gl renderer: Set an error if we don't have one already
    
    We can't fail and not set the error, since caller don't expect that.

 gsk/gl/gskglrenderer.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 2af766c99b..00fb5aea5e 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -3035,6 +3035,10 @@ gsk_gl_renderer_create_programs (GskGLRenderer  *self,
 out:
   gsk_gl_shader_builder_finish (&shader_builder);
 
+  if (error && !(*error))
+    g_set_error (error, GDK_GL_ERROR, GDK_GL_ERROR_COMPILATION_FAILED,
+                 "Failed to compile all shader programs"); /* Probably, eh. */
+
   return programs;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]