Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: tooltips.c Log Message: Fix segv when main imageclass in tooltip is missing. =================================================================== RCS file: /cvs/e/e16/e/src/tooltips.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -3 -r1.127 -r1.128 --- tooltips.c 24 May 2008 18:13:17 -0000 1.127 +++ tooltips.c 5 Jun 2008 08:07:15 -0000 1.128 @@ -91,10 +91,15 @@ const char *tclass, int dist, const char *tooltippic) { ToolTip *tt; + ImageClass *ic; if (ic0 == NULL || tclass == NULL) return NULL; + ic = ImageclassAlloc(ic0, 0); + if (!ic) + return NULL; + tt = ECALLOC(ToolTip, 1); if (!tt) return NULL; @@ -104,7 +109,7 @@ tt->iclass[1] = ImageclassAlloc(ic2, 0); tt->iclass[2] = ImageclassAlloc(ic3, 0); tt->iclass[3] = ImageclassAlloc(ic4, 0); - tt->iclass[4] = ImageclassAlloc(ic0, 0); + tt->iclass[4] = ic; tt->tclass = TextclassAlloc(tclass, 1); tt->tooltippic = ImageclassAlloc(tooltippic, 0); ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs