st: Don't assert when corner texture creation fails
This commit is contained in:
parent
63f6ff9151
commit
8416ba25de
@ -182,7 +182,6 @@ create_corner_material (StCornerSpec *corner)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
g_assert (texture != COGL_INVALID_HANDLE);
|
|
||||||
|
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
@ -355,7 +354,7 @@ st_theme_node_lookup_corner (StThemeNode *node,
|
|||||||
float height,
|
float height,
|
||||||
StCorner corner_id)
|
StCorner corner_id)
|
||||||
{
|
{
|
||||||
CoglHandle texture, material;
|
CoglHandle texture, material = COGL_INVALID_HANDLE;
|
||||||
char *key;
|
char *key;
|
||||||
StTextureCache *cache;
|
StTextureCache *cache;
|
||||||
StCornerSpec corner;
|
StCornerSpec corner;
|
||||||
@ -404,8 +403,12 @@ st_theme_node_lookup_corner (StThemeNode *node,
|
|||||||
|
|
||||||
key = corner_to_string (&corner);
|
key = corner_to_string (&corner);
|
||||||
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &corner, NULL);
|
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);
|
g_free (key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user