forked from enlightenment/efl
evas_get_color() attempts to dereference and write to every color
channel ptr without checking to see if it's null. -- ie things like evas_get_color(evas, obj, &r, &g, &b, 0) will actually work now. raster is a naugty boy. no pudding for raster tonight. SVN revision: 3266
This commit is contained in:
parent
02b1d9d83e
commit
48f4745b8d
|
@ -97,10 +97,10 @@ evas_get_color(Evas e, Evas_Object o, int *r, int *g, int *b, int *a)
|
||||||
Evas_Object_Text oo;
|
Evas_Object_Text oo;
|
||||||
|
|
||||||
oo = (Evas_Object_Text)o;
|
oo = (Evas_Object_Text)o;
|
||||||
*r = oo->current.r;
|
if (r) *r = oo->current.r;
|
||||||
*g = oo->current.g;
|
if (g) *g = oo->current.g;
|
||||||
*b = oo->current.b;
|
if (b) *b = oo->current.b;
|
||||||
*a = oo->current.a;
|
if (a) *a = oo->current.a;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OBJECT_RECTANGLE:
|
case OBJECT_RECTANGLE:
|
||||||
|
@ -108,10 +108,10 @@ evas_get_color(Evas e, Evas_Object o, int *r, int *g, int *b, int *a)
|
||||||
Evas_Object_Rectangle oo;
|
Evas_Object_Rectangle oo;
|
||||||
|
|
||||||
oo = (Evas_Object_Rectangle)o;
|
oo = (Evas_Object_Rectangle)o;
|
||||||
*r = oo->current.r;
|
if (r) *r = oo->current.r;
|
||||||
*g = oo->current.g;
|
if (g) *g = oo->current.g;
|
||||||
*b = oo->current.b;
|
if (b) *b = oo->current.b;
|
||||||
*a = oo->current.a;
|
if (a) *a = oo->current.a;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OBJECT_LINE:
|
case OBJECT_LINE:
|
||||||
|
@ -119,10 +119,10 @@ evas_get_color(Evas e, Evas_Object o, int *r, int *g, int *b, int *a)
|
||||||
Evas_Object_Line oo;
|
Evas_Object_Line oo;
|
||||||
|
|
||||||
oo = (Evas_Object_Line)o;
|
oo = (Evas_Object_Line)o;
|
||||||
*r = oo->current.r;
|
if (r) *r = oo->current.r;
|
||||||
*g = oo->current.g;
|
if (g) *g = oo->current.g;
|
||||||
*b = oo->current.b;
|
if (b) *b = oo->current.b;
|
||||||
*a = oo->current.a;
|
if (a) *a = oo->current.a;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue