comparison src/gtkwhiteboard.c @ 13410:184d62658af2

[gaim-migrate @ 15785] Cleanup the NULL checks in this function. Resolves CID 67 Resolves CID 68 Resolves CID 69 committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Mar 2006 21:40:22 +0000
parents bff6009364d4
children 16544c190fe6
comparison
equal deleted inserted replaced
13409:0a3c968b07dc 13410:184d62658af2
294 } 294 }
295 295
296 void gaim_gtk_whiteboard_exit(GtkWidget *widget, gpointer data) 296 void gaim_gtk_whiteboard_exit(GtkWidget *widget, gpointer data)
297 { 297 {
298 GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data; 298 GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data;
299 GaimWhiteboard *wb = gtkwb->wb; 299 GaimWhiteboard *wb;
300
301 g_return_if_fail(gtkwb != NULL);
302 wb = gtkwb->wb;
300 303
301 if(gtkwb->window && gtkwb->pixmap) 304 if(gtkwb->window && gtkwb->pixmap)
302 { 305 {
303 LocalShutdownRequest = TRUE; 306 LocalShutdownRequest = TRUE;
304 307
305 gaim_gtk_whiteboard_destroy(wb); 308 gaim_gtk_whiteboard_destroy(wb);
306 } 309 }
307 else 310 else
308 LocalShutdownRequest = FALSE; 311 LocalShutdownRequest = FALSE;
309 312
310 if(gtkwb) 313 g_free(gtkwb);
311 { 314 wb->ui_data = NULL;
312 g_free(gtkwb);
313
314 wb->ui_data = NULL;
315 }
316 315
317 /* Destroy whiteboard core, if the local user exited the whiteboard window */ 316 /* Destroy whiteboard core, if the local user exited the whiteboard window */
318 if(wb && LocalShutdownRequest) 317 if(wb && LocalShutdownRequest)
319 { 318 {
320 gaim_whiteboard_destroy(wb); 319 gaim_whiteboard_destroy(wb);