On Sat, 29 Dec 2012 05:45:39 -0800 "Enlightenment SVN" <[email protected]> wrote:
> Log: > terminology: fix termio's Evas_Smart_Class inheritance usage. > > - _smart_add(): if you set the smart data before clipped smart object > constructor, it will reuse that. No need to get, copy, free then reset. > > - _smart_del(): clipped smart object will free(sd) already, no need > to do it again (double free). > > > > Author: barbieri > Date: 2012-12-29 05:45:38 -0800 (Sat, 29 Dec 2012) > New Revision: 81869 > Trac: http://trac.enlightenment.org/e/changeset/81869 > > Modified: > trunk/terminology/src/bin/termio.c > > Modified: trunk/terminology/src/bin/termio.c > =================================================================== > --- trunk/terminology/src/bin/termio.c 2012-12-29 13:45:17 UTC (rev > 81868) > +++ trunk/terminology/src/bin/termio.c 2012-12-29 13:45:38 UTC (rev > 81869) > @@ -2150,19 +2150,15 @@ > _smart_add(Evas_Object *obj) > { > Termio *sd; > - Evas_Object_Smart_Clipped_Data *cd; > Evas_Object *o; > int i, j, k, l, n; > > - _parent_sc.add(obj); > - cd = evas_object_smart_data_get(obj); > - if (!cd) return; > sd = calloc(1, sizeof(Termio)); > - if (!sd) return; > - sd->__clipped_data = *cd; > - free(cd); > + EINA_SAFETY_ON_NULL_RETURN(sd); > evas_object_smart_data_set(obj, sd); > > + _parent_sc.add(obj); > + > /* Terminal output widget */ > o = evas_object_textgrid_add(evas_object_evas_get(obj)); > evas_object_pass_events_set(o, EINA_TRUE); > @@ -2347,8 +2343,6 @@ > termpty_shutdown(); > > _parent_sc.del(obj); > - evas_object_smart_data_set(obj, NULL); > - free(sd); > } > > static void > this fixes my crash ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
