comparison finch/libgnt/gntmain.c @ 18716:0873698f8cce

This fixes a few weird crashes in pygnt.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Jul 2007 15:58:08 +0000
parents 09db6fec9dce
children 85b155a574a3
comparison
equal deleted inserted replaced
18715:64a7b13d3b8d 18716:0873698f8cce
515 gnt_wm_new_window(wm, widget); 515 gnt_wm_new_window(wm, widget);
516 } 516 }
517 517
518 void gnt_screen_release(GntWidget *widget) 518 void gnt_screen_release(GntWidget *widget)
519 { 519 {
520 gnt_wm_window_close(wm, widget); 520 if (wm)
521 gnt_wm_window_close(wm, widget);
521 } 522 }
522 523
523 void gnt_screen_update(GntWidget *widget) 524 void gnt_screen_update(GntWidget *widget)
524 { 525 {
525 gnt_wm_update_window(wm, widget); 526 gnt_wm_update_window(wm, widget);
562 gnt_wm_update_window(wm, widget); 563 gnt_wm_update_window(wm, widget);
563 } 564 }
564 565
565 void gnt_quit() 566 void gnt_quit()
566 { 567 {
567 g_hash_table_destroy(wm->nodes); /* XXX: */ 568 g_object_unref(G_OBJECT(wm));
569 wm = NULL;
570
568 update_panels(); 571 update_panels();
569 doupdate(); 572 doupdate();
570 gnt_uninit_colors(); 573 gnt_uninit_colors();
571 gnt_uninit_styles(); 574 gnt_uninit_styles();
572 endwin(); 575 endwin();