]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
*fix* valgrind invalid read/write and memleaks
[chaz/tint2] / src / systray / systraybar.c
index 23d2ab3821d1b58883ed1a0a380dd36a1bea2626..8a840ce7130a11499a1b058e554c54c1ffbd1200 100644 (file)
@@ -532,6 +532,11 @@ void systray_render_icon_now(void* t)
        // we made also sure, that we always have a 32 bit visual, i.e. we can safely create 32 bit pixmaps here
        TrayWindow* traywin = t;
        traywin->render_timeout = 0;
+       if ( traywin->width == 0 || traywin->height == 0 ) {
+               // reschedule rendering since the geometry information has not yet been processed (can happen on slow cpu)
+               systray_render_icon(traywin);
+               return;
+       }
 
        // good systray icons support 32 bit depth, but some icons are still 24 bit.
        // We create a heuristic mask for these icons, i.e. we get the rgb value in the top left corner, and
This page took 0.017608 seconds and 4 git commands to generate.