diff options
Diffstat (limited to 'plugins/vtx/vtxfile.c')
-rw-r--r-- | plugins/vtx/vtxfile.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/vtx/vtxfile.c b/plugins/vtx/vtxfile.c index 9dbeb9f7..ff9914e6 100644 --- a/plugins/vtx/vtxfile.c +++ b/plugins/vtx/vtxfile.c @@ -192,12 +192,15 @@ void ayemu_vtx_free(ayemu_vtx_t *vtx) { #define FREE_PTR(x) if (x) { free(x); x = NULL; } - FREE_PTR(vtx->title); - FREE_PTR(vtx->author); - FREE_PTR(vtx->from); - FREE_PTR(vtx->tracker); - FREE_PTR(vtx->comment); - FREE_PTR(vtx->regdata); + if (vtx) { + FREE_PTR(vtx->title); + FREE_PTR(vtx->author); + FREE_PTR(vtx->from); + FREE_PTR(vtx->tracker); + FREE_PTR(vtx->comment); + FREE_PTR(vtx->regdata); + free (vtx); + } } |