And it's what i want :) 2011/9/1 Vincent Torri <[email protected]>: > > > On Thu, 1 Sep 2011, Nicolas Aguirre wrote: > >> 2011/8/31 Vincent Torri <[email protected]>: >>> >>> >>> On Wed, 31 Aug 2011, Enlightenment SVN wrote: >>> >>>> Log: >>>> PROTO/enna-explorer : prevent possible crash when mime type is NULL >>>> >>>> >>>> Author: captainigloo >>>> Date: 2011-08-31 14:43:35 -0700 (Wed, 31 Aug 2011) >>>> New Revision: 63048 >>>> Trac: http://trac.enlightenment.org/e/changeset/63048 >>>> >>>> Modified: >>>> trunk/PROTO/enna-explorer/src/bin/view_grid.c >>>> >>>> Modified: trunk/PROTO/enna-explorer/src/bin/view_grid.c >>>> =================================================================== >>>> --- trunk/PROTO/enna-explorer/src/bin/view_grid.c 2011-08-31 >>>> 21:33:32 UTC (rev 63047) >>>> +++ trunk/PROTO/enna-explorer/src/bin/view_grid.c 2011-08-31 >>>> 21:43:35 UTC (rev 63048) >>>> @@ -113,7 +113,7 @@ >>>> icon = efreet_mime_type_icon_get(mime, >>>> getenv("E_ICON_THEME"), 96); >>>> if (!icon) >>>> icon = efreet_mime_type_icon_get("unknown", >>>> getenv("E_ICON_THEME"), 96); >>>> - if (strstr(mime, "image/")) >>>> + if (mime && strstr(mime, "image/")) >>> >>> why not using eina_str_has_prefix() ? >>> >>> Vincent >> >> Because strstr does the job as excepted, is present in all lib C (i >> think) and i preffer use standard C fonction when it's possible. > > it does not : it finds the first occurrence or "image/" (in your case). It's > not guaranted that the mime type *begins* with "images/". Either use the > eina function, or add a check to verify that the mime types begins with > "image/" > > Vincent > >> >> -- >> Nicolas Aguirre >> Mail: [email protected] >> Web: http://enna.geexbox.org >> Blog: http://dev.enlightenment.fr/~captainigloo/ >> >> >> ------------------------------------------------------------------------------ >> Special Offer -- Download ArcSight Logger for FREE! >> Finally, a world-class log management solution at an even better >> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >> download Logger. Secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsisghtdev2dev >> _______________________________________________ >> enlightenment-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >
-- Nicolas Aguirre Mail: [email protected] Web: http://enna.geexbox.org Blog: http://dev.enlightenment.fr/~captainigloo/ ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
