Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-12 15:32:23 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-12 15:32:23 +0400
commitb53cbb4e011f7912f7ef5dcada86e77d55b76766 (patch)
treee89fa9d850f6313e6215853a1e1db7ca2d36400c /source/blender/blenkernel/intern/report.c
parentca5fd21bb5c43d605c8fef270e397184ec73d480 (diff)
Fix #30512: external render saved render result after reporting error.
Diffstat (limited to 'source/blender/blenkernel/intern/report.c')
-rw-r--r--source/blender/blenkernel/intern/report.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index ffa9e027108..04bb45df282 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -37,7 +37,6 @@
#include "BKE_report.h"
#include "BKE_global.h" /* G.background only */
-
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
@@ -264,12 +263,24 @@ void BKE_reports_print(ReportList *reports, ReportType level)
Report *BKE_reports_last_displayable(ReportList *reports)
{
- Report *report=NULL;
+ Report *report;
- for (report= (Report *)reports->list.last; report; report=report->prev) {
+ for (report= reports->list.last; report; report=report->prev) {
if (ELEM3(report->type, RPT_ERROR, RPT_WARNING, RPT_INFO))
return report;
}
return NULL;
}
+
+int BKE_reports_contain(ReportList *reports, ReportType level)
+{
+ Report *report;
+
+ for(report=reports->list.first; report; report=report->next)
+ if(report->type >= level)
+ return TRUE;
+
+ return FALSE;
+}
+