Fix error in Main cleanup

See 481cdb08ed
This commit is contained in:
Campbell Barton
2018-12-07 15:40:38 +11:00
parent 27e77d4f9c
commit d6d76759f8
2 changed files with 5 additions and 3 deletions

View File

@@ -174,8 +174,10 @@ struct BlendThumbnail *BKE_main_thumbnail_from_imbuf(struct Main *bmain, struct
struct ImBuf *BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data);
void BKE_main_thumbnail_create(struct Main *bmain);
const char *BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL();
const char *BKE_main_blendfile_path_from_global(void);
const char *BKE_main_blendfile_path(const struct Main *bmain)
ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
const char *BKE_main_blendfile_path_from_global(void)
ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL;
void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const int tag, const bool value);
void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value);

View File

@@ -578,7 +578,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
Main *bmain = CTX_data_main(C);
/* when loading startup.blend's, we can be left with a blank path */
if (BKE_main_blendfile_path(bmain)) {
if (BKE_main_blendfile_path(bmain)[0] != '\0') {
G.save_over = 1;
}
else {