]> Dogcows Code - chaz/tint2/commitdiff
*fix* using variable length array looks even better
authorAndreas Fink <andreas.fink85@googlemail.com>
Wed, 30 Sep 2009 17:52:32 +0000 (17:52 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Wed, 30 Sep 2009 17:52:32 +0000 (17:52 +0000)
src/taskbar/task.c

index c366ff6605d9ae87b2b4a37a268a3fb469f92b53..6fce7e6bb50e41bd03b82199d0856da054ce5a17 100644 (file)
@@ -201,12 +201,11 @@ void get_icon (Task *tsk)
                tmp_data = get_best_icon (data, get_icon_count (data, i), i, &w, &h, panel->g_task.icon_size1);
 
 #ifdef __x86_64__
-               DATA32 *icon_data = malloc (w * h * sizeof (DATA32));
+               DATA32 icon_data[w * h];
                int length = w * h;
                for (i = 0; i < length; ++i)
                        icon_data[i] =  tmp_data[i];
-               img = imlib_create_image_using_copied_data (w, h, icon_data);
-               free(icon_data);
+               img = imlib_create_image_using_data (w, h, icon_data);
 #else
                img = imlib_create_image_using_data (w, h, (DATA32*)tmp_data);
 #endif
This page took 0.020571 seconds and 4 git commands to generate.