diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index 057b716b4..85feb20cd 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -182,7 +182,6 @@ create_corner_material (StCornerSpec *corner) } g_free (data); - g_assert (texture != COGL_INVALID_HANDLE); return texture; } @@ -355,7 +354,7 @@ st_theme_node_lookup_corner (StThemeNode *node, float height, StCorner corner_id) { - CoglHandle texture, material; + CoglHandle texture, material = COGL_INVALID_HANDLE; char *key; StTextureCache *cache; StCornerSpec corner; @@ -404,8 +403,12 @@ st_theme_node_lookup_corner (StThemeNode *node, key = corner_to_string (&corner); texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &corner, NULL); - material = _st_create_texture_pipeline (texture); - cogl_handle_unref (texture); + + if (texture) + { + material = _st_create_texture_pipeline (texture); + cogl_handle_unref (texture); + } g_free (key);