Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_histogram.c 


Log Message:
Avoid attempting to draw a histogram if there is no usable data from the image.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_histogram.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_histogram.c     26 Sep 2006 18:33:47 -0000      1.4
+++ ewl_histogram.c     8 Oct 2006 07:06:54 -0000       1.5
@@ -192,7 +192,9 @@
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
-       ewl_histogram_draw(EWL_HISTOGRAM(w));
+       /* Only bother drawing if we've seen some usable data. */
+       if (EWL_HISTOGRAM(w)->maxv)
+               ewl_histogram_draw(EWL_HISTOGRAM(w));
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to