summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2013-12-31 11:22:20 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-31 13:23:30 +0900
commita810916c1f4248a350e97e419cb52a76a062a187 (patch)
treed413cd65d6570bce054054cd885fc7989dbf1b7e /src
parente319574b8234d7d753b04686036880e1658ba062 (diff)
fileselector: add NULL check
Diffstat (limited to 'src')
-rw-r--r--src/lib/elc_fileselector.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index e6a9b8eb9..6e4635ac2 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1366,7 +1366,7 @@ _is_save_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1366{ 1366{
1367 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1367 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1368 Elm_Fileselector_Smart_Data *sd = _pd; 1368 Elm_Fileselector_Smart_Data *sd = _pd;
1369 *ret = !elm_object_disabled_get(sd->name_entry); 1369 if (ret) *ret = !elm_object_disabled_get(sd->name_entry);
1370} 1370}
1371 1371
1372EAPI void 1372EAPI void
@@ -1403,7 +1403,7 @@ _folder_only_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1403{ 1403{
1404 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1404 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1405 Elm_Fileselector_Smart_Data *sd = _pd; 1405 Elm_Fileselector_Smart_Data *sd = _pd;
1406 *ret = sd->only_folder; 1406 if (ret) *ret = sd->only_folder;
1407} 1407}
1408 1408
1409EAPI void 1409EAPI void
@@ -1468,7 +1468,7 @@ _buttons_ok_cancel_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1468{ 1468{
1469 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1469 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1470 Elm_Fileselector_Smart_Data *sd = _pd; 1470 Elm_Fileselector_Smart_Data *sd = _pd;
1471 *ret = sd->ok_button ? EINA_TRUE : EINA_FALSE; 1471 if (ret) *ret = sd->ok_button ? EINA_TRUE : EINA_FALSE;
1472} 1472}
1473 1473
1474EAPI void 1474EAPI void
@@ -1504,7 +1504,7 @@ _expandable_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1504{ 1504{
1505 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1505 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1506 Elm_Fileselector_Smart_Data *sd = _pd; 1506 Elm_Fileselector_Smart_Data *sd = _pd;
1507 *ret = sd->expand; 1507 if (ret) *ret = sd->expand;
1508} 1508}
1509 1509
1510EAPI void 1510EAPI void
@@ -1540,7 +1540,7 @@ _path_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1540{ 1540{
1541 const char **ret = va_arg(*list, const char **); 1541 const char **ret = va_arg(*list, const char **);
1542 Elm_Fileselector_Smart_Data *sd = _pd; 1542 Elm_Fileselector_Smart_Data *sd = _pd;
1543 *ret = sd->path; 1543 if (ret) *ret = sd->path;
1544} 1544}
1545 1545
1546EAPI void 1546EAPI void
@@ -1599,7 +1599,7 @@ _mode_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1599{ 1599{
1600 Elm_Fileselector_Mode *ret = va_arg(*list, Elm_Fileselector_Mode *); 1600 Elm_Fileselector_Mode *ret = va_arg(*list, Elm_Fileselector_Mode *);
1601 Elm_Fileselector_Smart_Data *sd = _pd; 1601 Elm_Fileselector_Smart_Data *sd = _pd;
1602 *ret = sd->mode; 1602 if (ret) *ret = sd->mode;
1603} 1603}
1604 1604
1605EAPI void 1605EAPI void
@@ -1665,7 +1665,7 @@ _multi_select_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1665 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1665 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1666 Elm_Fileselector_Smart_Data *sd = _pd; 1666 Elm_Fileselector_Smart_Data *sd = _pd;
1667 1667
1668 *ret = sd->multi; 1668 if (ret) *ret = sd->multi;
1669} 1669}
1670 1670
1671EAPI const char * 1671EAPI const char *
@@ -1696,19 +1696,19 @@ _selected_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1696 return; 1696 return;
1697 } 1697 }
1698 1698
1699 *ret = sd->path; 1699 if (ret) *ret = sd->path;
1700 1700
1701 if (sd->mode == ELM_FILESELECTOR_LIST) 1701 if (sd->mode == ELM_FILESELECTOR_LIST)
1702 { 1702 {
1703 Elm_Object_Item *gl_it = elm_genlist_selected_item_get(sd->files_view); 1703 Elm_Object_Item *gl_it = elm_genlist_selected_item_get(sd->files_view);
1704 1704
1705 if (gl_it) *ret = elm_object_item_data_get(gl_it); 1705 if (gl_it && ret) *ret = elm_object_item_data_get(gl_it);
1706 } 1706 }
1707 else 1707 else
1708 { 1708 {
1709 Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(sd->files_view); 1709 Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(sd->files_view);
1710 1710
1711 if (gg_it) *ret = elm_object_item_data_get(gg_it); 1711 if (gg_it && ret) *ret = elm_object_item_data_get(gg_it);
1712 } 1712 }
1713 1713
1714} 1714}
@@ -1902,21 +1902,21 @@ _hidden_visible_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
1902 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1902 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1903 Elm_Fileselector_Smart_Data *sd = _pd; 1903 Elm_Fileselector_Smart_Data *sd = _pd;
1904 1904
1905 *ret = sd->hidden_visible; 1905 if (ret) *ret = sd->hidden_visible;
1906} 1906}
1907 1907
1908static void 1908static void
1909_elm_fileselector_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) 1909_elm_fileselector_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1910{ 1910{
1911 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1911 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1912 *ret = EINA_FALSE; 1912 if (ret) *ret = EINA_FALSE;
1913} 1913}
1914 1914
1915static void 1915static void
1916_elm_fileselector_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) 1916_elm_fileselector_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
1917{ 1917{
1918 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 1918 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1919 *ret = EINA_FALSE; 1919 if (ret) *ret = EINA_FALSE;
1920} 1920}
1921 1921
1922static void 1922static void