From: Enlightenment S. <no-...@en...> - 2009-09-28 22:05:52
|
Log: elm photocam: fix a case of divide by 0 Author: watchwolf Date: 2009-09-28 15:05:37 -0700 (Mon, 28 Sep 2009) New Revision: 42784 Modified: trunk/TMP/st/elementary/src/lib/elm_photocam.c Modified: trunk/TMP/st/elementary/src/lib/elm_photocam.c =================================================================== --- trunk/TMP/st/elementary/src/lib/elm_photocam.c 2009-09-28 20:03:56 UTC (rev 42783) +++ trunk/TMP/st/elementary/src/lib/elm_photocam.c 2009-09-28 22:05:37 UTC (rev 42784) @@ -1011,6 +1011,8 @@ wd->size.oh = wd->size.h; elm_smart_scroller_child_pos_get(wd->scr, &rx, &ry); elm_smart_scroller_child_viewport_size_get(wd->scr, &rw, &rh); + if(rw <= 0 || rh <= 0) return; + if (wd->mode == ELM_PHOTOCAM_ZOOM_MODE_MANUAL) { wd->size.nw = wd->size.imw / wd->zoom; |