elementary/elm_win: Also check for potential NULL in other defines

Thanks to Daniel Willmann pointing them out to me. Actually I wonder
why we need all this define and undef for ENGINE_COMPARE. Will dig a
bit deeper into that and see if we may can go with a single one.

SVN revision: 72144
This commit is contained in:
Stefan Schmidt 2012-06-14 15:56:42 +00:00
parent c6ff40ba13
commit 9c0f6e7709
1 changed files with 3 additions and 3 deletions

View File

@ -1270,7 +1270,7 @@ _elm_ee_xwin_get(const Ecore_Evas *ee)
Ecore_X_Window xwin = 0;
if (!ee) return 0;
#define ENGINE_COMPARE(name) (!strcmp(_elm_preferred_engine, name))
#define ENGINE_COMPARE(name) (_elm_preferred_engine && !strcmp(_elm_preferred_engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11))
{
if (ee) xwin = ecore_evas_software_x11_window_get(ee);
@ -2619,7 +2619,7 @@ elm_win_fullscreen_set(Evas_Object *obj,
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
// YYY: handle if sd->img_obj
#define ENGINE_COMPARE(name) (!strcmp(_elm_preferred_engine, name))
#define ENGINE_COMPARE(name) (_elm_preferred_engine && !strcmp(_elm_preferred_engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
{
@ -2643,7 +2643,7 @@ elm_win_fullscreen_get(const Evas_Object *obj)
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
#define ENGINE_COMPARE(name) (!strcmp(_elm_preferred_engine, name))
#define ENGINE_COMPARE(name) (_elm_preferred_engine && !strcmp(_elm_preferred_engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_FB) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
{