*fix* 2 memleaks

*fix* no more warnings


git-svn-id: http://tint2.googlecode.com/svn/trunk@335 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2010-01-10 22:16:27 +00:00
parent f9a7bb8b1e
commit 06518a0f4b
8 changed files with 44 additions and 35 deletions

View File

@@ -157,7 +157,7 @@ void cleanup()
if (snapshot_path) g_free(snapshot_path);
cleanup_server();
XCloseDisplay(server.dsp);
if (server.dsp) XCloseDisplay(server.dsp);
}
@@ -801,9 +801,11 @@ int main (int argc, char *argv[])
default:
if (e.type == XDamageNotify+damage_event) {
// union needed to avoid strict-aliasing warnings by gcc
union { XEvent e; XDamageNotifyEvent de; } event_union = {.e=e};
TrayWindow *traywin;
GSList *l;
XDamageNotifyEvent* de = (XDamageNotifyEvent*)&e;
XDamageNotifyEvent* de = &event_union.de;
for (l = systray.list_icons; l ; l = l->next) {
traywin = (TrayWindow*)l->data;
if ( traywin->id == de->drawable && !de->more ) {