Mercurial > MadButterfly
comparison src/redraw_man.c @ 251:f08b3ba9c1d8
Remove potential memory address error.
- Fix memory address error in mb_prop_store_destroy().
- Invoke mb_prop_store_destroy() in redraw_man.c to free property stores
for coord and shape objects.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 04 Jan 2009 12:09:29 +0800 |
parents | 65cabbdd5284 |
children | 50d253d0fcba |
comparison
equal
deleted
inserted
replaced
250:bd8ea44b421e | 251:f08b3ba9c1d8 |
---|---|
472 sh_detach_coord(shape); | 472 sh_detach_coord(shape); |
473 sh_detach_geo(shape); | 473 sh_detach_geo(shape); |
474 elmpool_elm_free(rdman->geo_pool, geo); | 474 elmpool_elm_free(rdman->geo_pool, geo); |
475 } | 475 } |
476 STAILQ_REMOVE(rdman->shapes, shape_t, sh_next, shape); | 476 STAILQ_REMOVE(rdman->shapes, shape_t, sh_next, shape); |
477 mb_prop_store_destroy(&shape->obj.props); | |
477 shape->free(shape); | 478 shape->free(shape); |
478 | 479 |
479 if(rdman->last_mouse_over == (mb_obj_t *)shape) | 480 if(rdman->last_mouse_over == (mb_obj_t *)shape) |
480 rdman->last_mouse_over = NULL; | 481 rdman->last_mouse_over = NULL; |
481 | 482 |
636 if(coord->flags & COF_OWN_CANVAS) | 637 if(coord->flags & COF_OWN_CANVAS) |
637 free_canvas(coord->canvas); | 638 free_canvas(coord->canvas); |
638 | 639 |
639 RM_CHILD(parent, coord); | 640 RM_CHILD(parent, coord); |
640 subject_free(coord->mouse_event); | 641 subject_free(coord->mouse_event); |
642 mb_prop_store_destroy(&coord->obj.props); | |
641 elmpool_elm_free(rdman->coord_pool, coord); | 643 elmpool_elm_free(rdman->coord_pool, coord); |
642 rdman->n_coords--; | 644 rdman->n_coords--; |
643 | 645 |
644 return OK; | 646 return OK; |
645 } | 647 } |