summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2006-01-23 03:00:35 +0000
committerCarsten Haitzler <raster@rasterman.com>2006-01-23 03:00:35 +0000
commitcc8c268dcd913a9d6b29c9790fdb0c240ccd2ec5 (patch)
treec00252841970b02a35b00842fb1364ce1ca7455f /legacy/emotion/src/lib/emotion_smart.c
parent22eee9acc5d8b478a9b0aaa1c1ee957db27dee8f (diff)
less segv's
SVN revision: 19977
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index d7ff42b68f..f66bb562a1 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -131,7 +131,7 @@ _emotion_module_close(Emotion_Video_Module *mod, void *video)
131 131
132 handle = mod->handle; 132 handle = mod->handle;
133 module_close = dlsym(handle, "module_close"); 133 module_close = dlsym(handle, "module_close");
134 if (module_close) module_close(mod, video); 134 if ((module_close) && (video)) module_close(mod, video);
135 dlclose(handle); 135 dlclose(handle);
136} 136}
137 137
@@ -190,6 +190,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
190 if ((file) && (file[0] != 0)) 190 if ((file) && (file[0] != 0))
191 { 191 {
192 int w, h; 192 int w, h;
193
193 sd->file = strdup(file); 194 sd->file = strdup(file);
194 if (sd->module) 195 if (sd->module)
195 { 196 {
@@ -210,6 +211,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
210 { 211 {
211 sd->module->file_close(sd->video); 212 sd->module->file_close(sd->video);
212 sd->video = NULL; 213 sd->video = NULL;
214 printf("VIDEO -> NULL\n");
213 evas_object_image_size_set(sd->obj, 0, 0); 215 evas_object_image_size_set(sd->obj, 0, 0);
214 } 216 }
215 } 217 }
@@ -1023,7 +1025,7 @@ _pixels_get(void *data, Evas_Object *obj)
1023 rows, 1025 rows,
1024 &rows[ps.h], 1026 &rows[ps.h],
1025 &rows[ps.h + (ps.h / 2)])) 1027 &rows[ps.h + (ps.h / 2)]))
1026 evas_object_image_pixels_import(obj, &ps); 1028 evas_object_image_pixels_import(obj, &ps);
1027 evas_object_image_pixels_dirty_set(obj, 0); 1029 evas_object_image_pixels_dirty_set(obj, 0);
1028 free(ps.rows); 1030 free(ps.rows);
1029 } 1031 }
@@ -1088,8 +1090,9 @@ _smart_del(Evas_Object * obj)
1088 Smart_Data *sd; 1090 Smart_Data *sd;
1089 sd = evas_object_smart_data_get(obj); 1091 sd = evas_object_smart_data_get(obj);
1090 if (!sd) return; 1092 if (!sd) return;
1093 printf("DEL: sd->video = %p\n", sd->video);
1091 if (sd->video) sd->module->file_close(sd->video); 1094 if (sd->video) sd->module->file_close(sd->video);
1092 if (sd->module) _emotion_module_close(sd->module, sd->video); 1095 _emotion_module_close(sd->module, sd->video);
1093 evas_object_del(sd->obj); 1096 evas_object_del(sd->obj);
1094 if (sd->file) free(sd->file); 1097 if (sd->file) free(sd->file);
1095 if (sd->job) ecore_job_del(sd->job); 1098 if (sd->job) ecore_job_del(sd->job);