Mercurial > MadButterfly
comparison src/graph_engine_openvg.c @ 1086:6723b2537993 openvg
Fix the issue that radial patterns would be changed in undefined way.
This is caused by reallocating a wrong pointer in
_mbe_pattern_create_gradient().
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Fri, 03 Dec 2010 17:19:08 +0800 |
parents | e229e1be6b82 |
children | cd34de1a6960 |
comparison
equal
deleted
inserted
replaced
1085:e229e1be6b82 | 1086:6723b2537993 |
---|---|
269 int i; | 269 int i; |
270 | 270 |
271 /* Make sure there is enough space */ | 271 /* Make sure there is enough space */ |
272 if(max_stop_cnt < stop_cnt) { | 272 if(max_stop_cnt < stop_cnt) { |
273 max_stop_cnt = (stop_cnt + 0xf) & ~0xf; | 273 max_stop_cnt = (stop_cnt + 0xf) & ~0xf; |
274 cur_ov_stop = (VGfloat *)realloc(stops, | 274 cur_ov_stop = (VGfloat *)realloc(ov_stops, |
275 max_stop_cnt * sizeof(VGfloat) * 5); | 275 max_stop_cnt * sizeof(VGfloat) * 5); |
276 if(cur_ov_stop == NULL) { | 276 if(cur_ov_stop == NULL) { |
277 max_stop_cnt = 0; | 277 max_stop_cnt = 0; |
278 return NULL; | 278 return NULL; |
279 } | 279 } |