summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-10-23 08:55:22 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-10-23 08:55:22 +0000
commit86e8c4ed53c9c9f067a7837fe3c4eb784e916ba8 (patch)
tree01bd7f595512b21b8dbdfc8f6f60c80165a0f5da /legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
parentd115ff8e3b8efe97d4b0db17a801e301acd5cf9c (diff)
fix possible size set segv in gl engine.
SVN revision: 78363
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
index 67a9f1c05b..20bbd325f5 100644
--- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
@@ -606,8 +606,18 @@ eng_image_size_set(void *data, void *image, int w, int h)
606 im->h = h; 606 im->h = h;
607 return image; 607 return image;
608 } 608 }
609 eng_window_use(re->win);
610 if ((im->tex) && (im->tex->pt->dyn.img))
611 {
612 evas_gl_common_texture_free(im->tex);
613 im->tex = NULL;
614 im->w = w;
615 im->h = h;
616 im->tex = evas_gl_common_texture_dynamic_new(im->gc, im);
617 return image;
618 }
609 im_old = image; 619 im_old = image;
610 620
611 switch (eng_image_colorspace_get(data, image)) 621 switch (eng_image_colorspace_get(data, image))
612 { 622 {
613 case EVAS_COLORSPACE_YCBCR422P601_PL: 623 case EVAS_COLORSPACE_YCBCR422P601_PL:
@@ -619,7 +629,9 @@ eng_image_size_set(void *data, void *image, int w, int h)
619 break; 629 break;
620 } 630 }
621 631
622 if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h)) 632 if ((im_old->im) &&
633 ((int)im_old->im->cache_entry.w == w) &&
634 ((int)im_old->im->cache_entry.h == h))
623 return image; 635 return image;
624 if (im_old) 636 if (im_old)
625 { 637 {