>From 0705be159f1bf31026a5a6abf2652d35264b8ff6 Mon Sep 17 00:00:00 2001
From: Beata Koziarek <b.koziarek@samsung.com>
Date: Wed, 19 Sep 2012 12:03:51 +0200
Subject: [PATCH] [LINUXETC-257][LINUXETC-258][LINUXETC-262] check if given
 parameters (size and time values) are not negative values

Change-Id: Idaab3fb731f6a914ed7ff605d56457a5f8c77b20
---
 trunk/elementary/src/lib/elm_config.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/trunk/elementary/src/lib/elm_config.c b/trunk/elementary/src/lib/elm_config.c
index 686e17d..7ae0b94 100644
--- a/trunk/elementary/src/lib/elm_config.c
+++ b/trunk/elementary/src/lib/elm_config.c
@@ -1641,6 +1641,7 @@ elm_config_scale_get(void)
 EAPI void
 elm_config_scale_set(double scale)
 {
+   if (scale < 0.0) return;
    if (_elm_config->scale == scale) return;
    _elm_config->scale = scale;
    _elm_rescale();
@@ -1669,6 +1670,7 @@ elm_config_password_show_last_timeout_get(void)
 EAPI void
 elm_config_password_show_last_timeout_set(double password_show_last_timeout)
 {
+   if (password_show_last_timeout < 0.0) return;
    if (_elm_config->password_show_last_timeout == password_show_last_timeout) return;
    _elm_config->password_show_last_timeout = password_show_last_timeout;
    edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
@@ -1777,6 +1779,7 @@ elm_config_font_overlay_set(const char    *text_class,
                      Evas_Font_Size size)
 {
    EINA_SAFETY_ON_NULL_RETURN(text_class);
+   if (size < 0) return;
    _elm_config_font_overlay_set(text_class, font, size);
 }
 
@@ -1803,6 +1806,7 @@ elm_config_finger_size_get(void)
 EAPI void
 elm_config_finger_size_set(Evas_Coord size)
 {
+   if (size < 0) return;
    if (_elm_config->finger_size == size) return;
    _elm_config->finger_size = size;
    _elm_rescale();
@@ -1849,6 +1853,7 @@ elm_config_cache_font_cache_size_get(void)
 EAPI void
 elm_config_cache_font_cache_size_set(int size)
 {
+   if (size < 0) return;
    if (_elm_config->font_cache == size) return;
    _elm_config->font_cache = size;
 
@@ -1864,6 +1869,7 @@ elm_config_cache_image_cache_size_get(void)
 EAPI void
 elm_config_cache_image_cache_size_set(int size)
 {
+   if (size < 0) return;
    if (_elm_config->image_cache == size) return;
    _elm_config->image_cache = size;
 
@@ -1879,6 +1885,7 @@ elm_config_cache_edje_file_cache_size_get()
 EAPI void
 elm_config_cache_edje_file_cache_size_set(int size)
 {
+   if (size < 0) return;
    if (_elm_config->edje_cache == size) return;
    _elm_config->edje_cache = size;
 
@@ -2063,6 +2070,7 @@ elm_config_scroll_thumbscroll_sensitivity_friction_set(double friction)
 EAPI void
 elm_config_longpress_timeout_set(double longpress_timeout)
 {
+   if (longpress_timeout < 0.0) return;
    _elm_config->longpress_timeout = longpress_timeout;
 }
 
-- 
1.7.5.4

