summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-22 14:37:56 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-22 14:39:10 -0500
commit6a934f703c8f800dcd17f0be947075040c549089 (patch)
treea0ec0f1784d3c39c403795c57572868fcc4fcba2 /src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
parent02594a25199c377fd9eb73d071d33500e88443e3 (diff)
ee engines should not crash when re-setting the same title/name_class
@fix
Diffstat (limited to 'src/modules/ecore_evas/engines/drm/ecore_evas_drm.c')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 7e458e1456..40ec670550 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -692,6 +692,7 @@ _ecore_evas_drm_hide(Ecore_Evas *ee)
692static void 692static void
693_ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title) 693_ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title)
694{ 694{
695 if (eina_streq(ee->prop.title, title)) return;
695 if (ee->prop.title) free(ee->prop.title); 696 if (ee->prop.title) free(ee->prop.title);
696 ee->prop.title = NULL; 697 ee->prop.title = NULL;
697 if (title) ee->prop.title = strdup(title); 698 if (title) ee->prop.title = strdup(title);
@@ -700,12 +701,18 @@ _ecore_evas_drm_title_set(Ecore_Evas *ee, const char *title)
700static void 701static void
701_ecore_evas_drm_name_class_set(Ecore_Evas *ee, const char *n, const char *c) 702_ecore_evas_drm_name_class_set(Ecore_Evas *ee, const char *n, const char *c)
702{ 703{
703 if (ee->prop.name) free(ee->prop.name); 704 if (!eina_streq(ee->prop.name, n))
704 if (ee->prop.clas) free(ee->prop.clas); 705 {
705 ee->prop.name = NULL; 706 if (ee->prop.name) free(ee->prop.name);
706 ee->prop.clas = NULL; 707 ee->prop.name = NULL;
707 if (n) ee->prop.name = strdup(n); 708 if (n) ee->prop.name = strdup(n);
708 if (c) ee->prop.clas = strdup(c); 709 }
710 if (!eina_streq(ee->prop.clas, c))
711 {
712 if (ee->prop.clas) free(ee->prop.clas);
713 ee->prop.clas = NULL;
714 if (c) ee->prop.clas = strdup(c);
715 }
709} 716}
710 717
711static void 718static void