X-Git-Url: https://harrygodden.com/git/?p=csRadar.git;a=blobdiff_plain;f=vmf.h;fp=vmf.h;h=ec9573aaa8c21feeebca6fe9716e1f976290d742;hp=d2bbbd214dd21b85c74a2edf2f429481f28a67d1;hb=1d2752b69b6285d5eb6436728c6cf84228a9ccde;hpb=b95752d31a7b1e224b227093f13a72d8c2b7f34b diff --git a/vmf.h b/vmf.h index d2bbbd2..ec9573a 100644 --- a/vmf.h +++ b/vmf.h @@ -725,6 +725,12 @@ vmf_map *vmf_init( const char *path, int load_models ) vmf_map *map = csr_calloc( sizeof( vmf_map ) ); map->root = vdf_open_file( path ); + if( !map->root ) + { + free( map ); + return NULL; + } + // Prepare instances vmf_load_all_instances( map, map->root );