fixed memory leak
git-svn-id: http://tint2.googlecode.com/svn/trunk@190 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
b3e399b3d2
commit
4d5b3958d2
1 changed files with 2 additions and 2 deletions
|
@ -200,11 +200,10 @@ void get_icon (Task *tsk)
|
||||||
for (i = 0; i < length; ++i)
|
for (i = 0; i < length; ++i)
|
||||||
icon_data[i] = tmp_data[i];
|
icon_data[i] = tmp_data[i];
|
||||||
img = imlib_create_image_using_data (w, h, icon_data);
|
img = imlib_create_image_using_data (w, h, icon_data);
|
||||||
|
free(icon_data);
|
||||||
#else
|
#else
|
||||||
img = imlib_create_image_using_data (w, h, (DATA32*)tmp_data);
|
img = imlib_create_image_using_data (w, h, (DATA32*)tmp_data);
|
||||||
#endif
|
#endif
|
||||||
imlib_context_set_image(img);
|
|
||||||
imlib_image_set_has_alpha(1);
|
|
||||||
XFree (data);
|
XFree (data);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -233,6 +232,7 @@ void get_icon (Task *tsk)
|
||||||
|
|
||||||
// transform icons
|
// transform icons
|
||||||
imlib_context_set_image(img);
|
imlib_context_set_image(img);
|
||||||
|
imlib_image_set_has_alpha(1);
|
||||||
tsk->icon = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), panel->g_task.icon_size1, panel->g_task.icon_size1);
|
tsk->icon = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), panel->g_task.icon_size1, panel->g_task.icon_size1);
|
||||||
imlib_free_image();
|
imlib_free_image();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue