elementary: make sure private data are safe to manipulate.

SVN revision: 80568
This commit is contained in:
Cedric BAIL 2012-12-10 06:59:46 +00:00
parent c552527bf4
commit 635c56fe3c
3 changed files with 20 additions and 18 deletions

View File

@ -796,3 +796,7 @@
2012-12-08 ChunEon Park (Hermet)
* Fix the naviframe title_set problem that caused the title visible status reset.
2012-12-10 Cedric Bail
* Make sure private data is not NULL in elm_interface_scrollable.

View File

@ -86,6 +86,7 @@ Fixes:
* Safer call to mkstemp in elm_cnp.
* Simplify test in elm_entry_text_set.
* Fix focus problem in multibuttonentry. Entry can get focus only when multibuttonentry is focused.
* Make sure private data is not NULL in elm_interface_scrollable.
Removals:

View File

@ -8,25 +8,22 @@ EAPI Eo_Op ELM_OBJ_PAN_BASE_ID = EO_NOOP;
#define MY_PAN_CLASS_NAME "elm_pan"
#define ELM_PAN_DATA_GET(o, sd) \
Elm_Pan_Smart_Data * sd = eo_data_get(o, MY_PAN_CLASS)
#define ELM_PAN_DATA_GET_OR_RETURN(o, ptr) \
ELM_PAN_DATA_GET(o, ptr); \
if (!ptr) \
{ \
CRITICAL("No smart data for object %p (%s)", \
o, evas_object_type_get(o)); \
return; \
#define ELM_PAN_DATA_GET_OR_RETURN(o, ptr) \
Elm_Pan_Smart_Data *ptr = eo_data_get(o, MY_PAN_CLASS); \
if (!ptr) \
{ \
CRITICAL("No smart data for object %p (%s)", \
o, evas_object_type_get(o)); \
return; \
}
#define ELM_PAN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
ELM_PAN_DATA_GET(o, ptr); \
if (!ptr) \
{ \
CRITICAL("No smart data for object %p (%s)", \
o, evas_object_type_get(o)); \
return val; \
#define ELM_PAN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
Elm_Pan_Smart_Data *ptr = eo_data_get(o, MY_PAN_CLASS); \
if (!ptr) \
{ \
CRITICAL("No smart data for object %p (%s)", \
o, evas_object_type_get(o)); \
return val; \
}
static const char SIG_CHANGED[] = "changed";
@ -286,7 +283,7 @@ _elm_pan_content_set(Evas_Object *obj,
{
Evas_Coord w, h;
ELM_PAN_DATA_GET(obj, psd);
ELM_PAN_DATA_GET_OR_RETURN(obj, psd);
if (content == psd->content) return;
if (psd->content)