elm_map: fix wrong check of source search
authorSungtaek Hong <sth253.hong@samsung.com>
Fri, 5 Aug 2016 06:36:41 +0000 (15:36 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 8 Aug 2016 06:16:53 +0000 (15:16 +0900)
Summary:
When map source is set by elm_map_source_set(),
it foreaches enlisted sources, and should return
when the source cannot be found.

@fix

Test Plan:
Call elm_map_source_set(map, [any type], [Wrong source name]);
         Observe  ERR("source name (%s) is not found", source_name) message.

Reviewers: Hermet, cedric, jpeg

Reviewed By: jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4212

src/lib/elementary/elm_map.c

index 346d49e..7c6fc88 100644 (file)
@@ -3390,7 +3390,7 @@ _source_tile_set(Elm_Map_Data *sd,
              break;
           }
      }
-   if (!sd->src_tile)
+   if (!l)
      {
         ERR("source name (%s) is not found", source_name);
         return;
@@ -3431,7 +3431,7 @@ _source_route_set(Elm_Map_Data *sd,
              break;
           }
      }
-   if (!sd->src_route)
+   if (!l)
      {
         ERR("source name (%s) is not found", source_name);
         return;
@@ -3458,7 +3458,7 @@ _source_name_set(Elm_Map_Data *sd,
              break;
           }
      }
-   if (!sd->src_name)
+   if (!l)
      {
         ERR("source name (%s) is not found", source_name);
         return;