forked from enlightenment/efl
elementary: make sure private data are safe to manipulate.
SVN revision: 80568
This commit is contained in:
parent
c552527bf4
commit
635c56fe3c
|
@ -796,3 +796,7 @@
|
||||||
2012-12-08 ChunEon Park (Hermet)
|
2012-12-08 ChunEon Park (Hermet)
|
||||||
|
|
||||||
* Fix the naviframe title_set problem that caused the title visible status reset.
|
* 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.
|
||||||
|
|
|
@ -86,6 +86,7 @@ Fixes:
|
||||||
* Safer call to mkstemp in elm_cnp.
|
* Safer call to mkstemp in elm_cnp.
|
||||||
* Simplify test in elm_entry_text_set.
|
* Simplify test in elm_entry_text_set.
|
||||||
* Fix focus problem in multibuttonentry. Entry can get focus only when multibuttonentry is focused.
|
* 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:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -8,25 +8,22 @@ EAPI Eo_Op ELM_OBJ_PAN_BASE_ID = EO_NOOP;
|
||||||
|
|
||||||
#define MY_PAN_CLASS_NAME "elm_pan"
|
#define MY_PAN_CLASS_NAME "elm_pan"
|
||||||
|
|
||||||
#define ELM_PAN_DATA_GET(o, sd) \
|
#define ELM_PAN_DATA_GET_OR_RETURN(o, ptr) \
|
||||||
Elm_Pan_Smart_Data * sd = eo_data_get(o, MY_PAN_CLASS)
|
Elm_Pan_Smart_Data *ptr = eo_data_get(o, MY_PAN_CLASS); \
|
||||||
|
if (!ptr) \
|
||||||
#define ELM_PAN_DATA_GET_OR_RETURN(o, ptr) \
|
{ \
|
||||||
ELM_PAN_DATA_GET(o, ptr); \
|
CRITICAL("No smart data for object %p (%s)", \
|
||||||
if (!ptr) \
|
o, evas_object_type_get(o)); \
|
||||||
{ \
|
return; \
|
||||||
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) \
|
#define ELM_PAN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||||
ELM_PAN_DATA_GET(o, ptr); \
|
Elm_Pan_Smart_Data *ptr = eo_data_get(o, MY_PAN_CLASS); \
|
||||||
if (!ptr) \
|
if (!ptr) \
|
||||||
{ \
|
{ \
|
||||||
CRITICAL("No smart data for object %p (%s)", \
|
CRITICAL("No smart data for object %p (%s)", \
|
||||||
o, evas_object_type_get(o)); \
|
o, evas_object_type_get(o)); \
|
||||||
return val; \
|
return val; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char SIG_CHANGED[] = "changed";
|
static const char SIG_CHANGED[] = "changed";
|
||||||
|
@ -286,7 +283,7 @@ _elm_pan_content_set(Evas_Object *obj,
|
||||||
{
|
{
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
|
||||||
ELM_PAN_DATA_GET(obj, psd);
|
ELM_PAN_DATA_GET_OR_RETURN(obj, psd);
|
||||||
|
|
||||||
if (content == psd->content) return;
|
if (content == psd->content) return;
|
||||||
if (psd->content)
|
if (psd->content)
|
||||||
|
|
Loading…
Reference in New Issue