Fix I/O debug message printed without debugging enabled

This commit is contained in:
Brecht Van Lommel 2023-10-04 16:13:56 +02:00
parent af91b3dd72
commit 6f6fd99dbb
1 changed files with 4 additions and 1 deletions

View File

@ -1432,7 +1432,10 @@ static void write_file_main_validate_pre(Main *bmain, ReportList *reports)
return;
}
BKE_report(reports, RPT_DEBUG, "Checking validity of current .blend file *BEFORE* save to disk");
if (G.debug & G_DEBUG_IO) {
BKE_report(
reports, RPT_DEBUG, "Checking validity of current .blend file *BEFORE* save to disk");
}
BLO_main_validate_shapekeys(bmain, reports);
if (!BKE_main_namemap_validate_and_fix(bmain)) {