This commit, along with other recent CID-fixing commits, does not make
sense in the context of the code's functionality, and it only serves to
make the code less clear. Please try not to add null checks like this to
resolve a CID report; marking the CID as a false positive is a completely
valid strategy.

On Wed, Oct 14, 2015 at 11:02 AM Christopher Michael <devilho...@comcast.net>
wrote:

> devilhorns pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/enlightenment.git/commit/?id=d74273f7324c2d32e0710e02dd28f17a7396be55
>
> commit d74273f7324c2d32e0710e02dd28f17a7396be55
> Author: Chris Michael <cp.mich...@samsung.com>
> Date:   Wed Oct 14 10:59:31 2015 -0400
>
>     enlightenment: Make sure we have a zone before calling
>     _bgpreview_viewport_update
>
>     @fix CID1324753
>
>     Signed-off-by: Chris Michael <cp.mich...@samsung.com>
> ---
>  src/bin/e_widget_bgpreview.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/bin/e_widget_bgpreview.c b/src/bin/e_widget_bgpreview.c
> index 79932b8..c4dbb20 100644
> --- a/src/bin/e_widget_bgpreview.c
> +++ b/src/bin/e_widget_bgpreview.c
> @@ -324,11 +324,13 @@ _e_wid_cb_bg_update(void *data, int type, void
> *event)
>         ((ev->desk_x < 0) || (dd->x == ev->desk_x)) &&
>         ((ev->desk_y < 0) || (dd->y == ev->desk_y)))
>       {
> +        E_Zone *zone;
>          const char *bgfile;
>
> +        zone = e_comp_zone_number_get(dd->zone);
>          bgfile = e_bg_file_get(dd->zone, dd->x, dd->y);
>          edje_object_file_set(dd->thumb, bgfile, "e/desktop/background");
> -        _bgpreview_viewport_update(dd->thumb,
> e_comp_zone_number_get(dd->zone), dd->x, dd->y);
> +        if (zone) _bgpreview_viewport_update(dd->thumb, zone, dd->x,
> dd->y);
>          eina_stringshare_del(bgfile);
>       }
>
>
> --
>
>
>
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to