2.5 Branch: added WM_report and WM_reportf functions for reporting
[blender.git] / source / blender / windowmanager / intern / wm.c
index 9727aa0f4ca060c03b04b6325bc3b7dd0c937b2b..87a3ce790f94dc2822ee66758b1fde63982f0ef5 100644 (file)
@@ -43,6 +43,7 @@
 #include "wm_window.h"
 #include "wm_event_system.h"
 #include "wm_event_types.h"
+#include "wm.h"
 
 #include "ED_screen.h"
 
@@ -130,6 +131,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
 {
        wmWindow *win;
        wmOperator *op;
+       wmReport *report;
        
        while((win= wm->windows.first)) {
                BLI_remlink(&wm->windows, win);
@@ -141,6 +143,11 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
                wm_operator_free(op);
        }
 
+       while((report= wm->reports.first)) {
+               BLI_remlink(&wm->reports, report);
+               wm_report_free(report);
+       }
+
        BLI_freelistN(&wm->timekeymap);
        BLI_freelistN(&wm->windowkeymap);
        BLI_freelistN(&wm->screenkeymap);