Skip to content

Commit 7a2e2c0

Browse files
SiegeLordExSiegeLord
authored andcommitted
Make al_destroy_vertex_decl(NULL) work.
1 parent 4fc0d98 commit 7a2e2c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

addons/primitives/primitives.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ ALLEGRO_VERTEX_DECL* al_create_vertex_decl(const ALLEGRO_VERTEX_ELEMENT* element
224224
*/
225225
void al_destroy_vertex_decl(ALLEGRO_VERTEX_DECL* decl)
226226
{
227+
if (!decl)
228+
return;
227229
al_free(decl->elements);
228230
/*
229231
* TODO: Somehow free the d3d_decl

0 commit comments

Comments
 (0)