Mercurial > MadButterfly
comparison src/img_ldr.c @ 346:b391722bf20e
sh_image_t::img_data is managed by paint_image_t.
- sh_image_t should not try to free it.
- call sh_text_P_generate_layout() in sh_text_transform()
- remove calling from other functions.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 08 Mar 2009 14:44:41 +0800 |
parents | 43900cae1d49 |
children | 3e84458968ec |
comparison
equal
deleted
inserted
replaced
345:d04085404583 | 346:b391722bf20e |
---|---|
111 if(ldr->repo == NULL) { | 111 if(ldr->repo == NULL) { |
112 free(ldr); | 112 free(ldr); |
113 return NULL; | 113 return NULL; |
114 } | 114 } |
115 strcpy((char *)ldr->repo, img_repository); | 115 strcpy((char *)ldr->repo, img_repository); |
116 if(img_repository[sz - 1] != '/') { | 116 if(img_repository[sz - 1] != '/' && strlen(img_repository) != 0) { |
117 ((char *)ldr->repo)[sz] = '/'; | 117 ((char *)ldr->repo)[sz] = '/'; |
118 ((char *)ldr->repo)[sz + 1] = 0; | 118 ((char *)ldr->repo)[sz + 1] = 0; |
119 } | 119 } |
120 | 120 |
121 ldr->ldr.load = simple_mb_img_ldr_load; | 121 ldr->ldr.load = simple_mb_img_ldr_load; |