Commit e3764808 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

picture: assert that there is a destroy callback

Pictures without destroy callback are allocated on the stack and never
explicitly released.
parent cbaaea93
...@@ -289,8 +289,8 @@ void picture_Release( picture_t *p_picture ) ...@@ -289,8 +289,8 @@ void picture_Release( picture_t *p_picture )
return; return;
PictureDestroyContext( p_picture ); PictureDestroyContext( p_picture );
if( p_picture->gc.pf_destroy != NULL ) assert( p_picture->gc.pf_destroy != NULL );
p_picture->gc.pf_destroy( p_picture ); p_picture->gc.pf_destroy( p_picture );
} }
bool picture_IsReferenced( picture_t *p_picture ) bool picture_IsReferenced( picture_t *p_picture )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment