fix segv.

SVN revision: 44948
This commit is contained in:
Carsten Haitzler 2010-01-07 14:01:35 +00:00
parent 77fda764ed
commit b2e8f4cd5a
1 changed files with 20 additions and 16 deletions

View File

@ -150,7 +150,8 @@ _e_mod_comp_update_rects_get(Update *up)
int ri = 0; int ri = 0;
int x, y; int x, y;
unsigned char *t, *t2, *t3; unsigned char *t, *t2, *t3;
if (!up->tiles) return NULL;
r = calloc((up->tw * up->th) + 1, sizeof(Update_Rect)); r = calloc((up->tw * up->th) + 1, sizeof(Update_Rect));
if (!r) return NULL; if (!r) return NULL;
t = up->tiles; t = up->tiles;
@ -250,23 +251,26 @@ _e_mod_comp_cb_animator(void *data)
cw->update = 0; cw->update = 0;
r = _e_mod_comp_update_rects_get(cw->up); r = _e_mod_comp_update_rects_get(cw->up);
_e_mod_comp_update_clear(cw->up); if (r)
if (cw->xim)
{ {
for (i = 0; r[i].w > 0; i++) _e_mod_comp_update_clear(cw->up);
if (cw->xim)
{ {
unsigned int *pix; for (i = 0; r[i].w > 0; i++)
int x, y, w, h; {
unsigned int *pix;
x = r[i].x; int x, y, w, h;
y = r[i].y;
w = r[i].w; x = r[i].x;
h = r[i].h; y = r[i].y;
ecore_x_image_get(cw->xim, cw->pixmap, x, y, x, y, w, h); w = r[i].w;
pix = ecore_x_image_data_get(cw->xim, NULL, NULL, NULL); h = r[i].h;
evas_object_image_size_set(cw->obj, cw->w, cw->h); ecore_x_image_get(cw->xim, cw->pixmap, x, y, x, y, w, h);
evas_object_image_data_set(cw->obj, pix); pix = ecore_x_image_data_get(cw->xim, NULL, NULL, NULL);
evas_object_image_data_update_add(cw->obj, x, y, w, h); evas_object_image_size_set(cw->obj, cw->w, cw->h);
evas_object_image_data_set(cw->obj, pix);
evas_object_image_data_update_add(cw->obj, x, y, w, h);
}
} }
} }
free(r); free(r);