evas/map: permit evas_map_free(NULL)
authorMike Blumenkrantz <zmike@samsung.com>
Fri, 19 Jul 2019 19:44:08 +0000 (15:44 -0400)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 23 Jul 2019 05:04:43 +0000 (14:04 +0900)
free functions in efl should always handle null pointers gracefully

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9363

src/lib/evas/canvas/evas_map.c

index 3d6d15f..ae971bc 100644 (file)
@@ -739,10 +739,7 @@ evas_map_dup(const Evas_Map *m)
 EAPI void
 evas_map_free(Evas_Map *m)
 {
-   MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
-   return;
-   MAGIC_CHECK_END();
-
+   if (!m) return;
    _evas_map_free(NULL, m);
 }