2005-02-10 [colin] 1.0.1cvs3.1
[claws.git] / src / mainwindow.c
index 8525b86fe6947d2b746d2d2ffcdeb69a2879862b..94bd360badece87b048442cf46951296ce5e6f75 100644 (file)
@@ -1123,6 +1123,7 @@ void main_window_destroy(MainWindow *mainwin)
 {
        /* TODO : destroy other component */
        messageview_destroy(mainwin->messageview);
+       mainwin->messageview = NULL;    
 }
 
 void main_window_update_actions_menu(MainWindow *mainwin)
@@ -1492,6 +1493,12 @@ void main_window_get_size(MainWindow *mainwin)
 {
        GtkAllocation *allocation;
 
+       if (mainwin->messageview == NULL) {
+               debug_print("called after messageview "
+                           "has been deallocated!\n");
+               return;
+       }
+
        allocation = &(GTK_WIDGET_PTR(mainwin->summaryview)->allocation);
 
        if (allocation->width > 1 && allocation->height > 1) {