aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-05 18:26:13 -0400
committerGitHub <noreply@github.com>2017-08-05 18:26:13 -0400
commitd6d1d57c69daf301bbefe76b81d8fb12f54a2812 (patch)
tree6980684640b9089bed5324388386427fbca63fdf /render/gles2
parentce886c03539319f7b3327a4adde3c912e349e0f4 (diff)
parentfdab81e1c95f872e61ab6ff4be65f09fe552f6f2 (diff)
Merge pull request #31 from nyorain/merged
Use meson as build system
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 897dc3b8..f2a57a56 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -123,7 +123,11 @@ static void draw_quad() {
static bool wlr_gles2_render_surface(struct wlr_renderer_state *state,
struct wlr_surface *surface, const float (*matrix)[16]) {
- assert(surface && surface->valid);
+ if(!surface || !surface->valid) {
+ wlr_log(L_ERROR, "attempt to render invalid surface");
+ return false;
+ }
+
wlr_surface_bind(surface);
GL_CALL(glUniformMatrix4fv(0, 1, GL_FALSE, *matrix));
// TODO: source alpha from somewhere else I guess