summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-04-10 17:09:07 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-04-10 17:23:12 -0300
commit37a04b09d22e33fa3a9b0f0aa04aa9effe7b292f (patch)
tree1291b44ee627bd4d9eadc92abaacb646d33b68ff
parentdea4bcf47c02480533a9a1eaf3447f9ba4d3a93d (diff)
eio-model: Fixed crash when files are created in the temporary dir
Fixed a crash when temporary files were created before the tested file, causing a dereference of a NULL pointer.
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index 11d9e172a3..87a4ee379b 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -34,7 +34,7 @@ _load_monitor_status_cb(void *data, Eo *obj, const Eo_Event_Description *desc EI
34 str = eina_value_to_string(value_prop); 34 str = eina_value_to_string(value_prop);
35 fail_if(!str, "ERROR: Cannot convert value to string!\n"); 35 fail_if(!str, "ERROR: Cannot convert value to string!\n");
36 fprintf(stderr, "new children filename %s\n", str); 36 fprintf(stderr, "new children filename %s\n", str);
37 if(strcmp(str, temp_filename) == 0) 37 if(temp_filename && strcmp(str, temp_filename) == 0)
38 { 38 {
39 fprintf(stderr, "is child that we want\n"); 39 fprintf(stderr, "is child that we want\n");
40 eo_do(obj, eo_event_callback_del(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_monitor_status_cb, data)); 40 eo_do(obj, eo_event_callback_del(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_monitor_status_cb, data));
@@ -64,7 +64,7 @@ _children_removed_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event
64 64
65 str = eina_value_to_string(value_prop); 65 str = eina_value_to_string(value_prop);
66 fail_if(!str, "ERROR: Cannot convert value to string!\n"); 66 fail_if(!str, "ERROR: Cannot convert value to string!\n");
67 if(strcmp(str, temp_filename) == 0) 67 if(temp_filename && strcmp(str, temp_filename) == 0)
68 ecore_main_loop_quit(); 68 ecore_main_loop_quit();
69 } 69 }
70 } 70 }