Fix #105325: crash calling asset_generate_preview() in backgound mode #106046
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "BKE_asset.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_icons.h"
|
||||
#include "BKE_idtype.h"
|
||||
#include "BKE_lib_id.h"
|
||||
|
@ -52,7 +53,7 @@ void ED_asset_generate_preview(const bContext *C, ID *id)
|
|||
BKE_previewimg_clear(preview);
|
||||
}
|
||||
|
||||
UI_icon_render_id(C, nullptr, id, ICON_SIZE_PREVIEW, true);
|
||||
UI_icon_render_id(C, nullptr, id, ICON_SIZE_PREVIEW, !G.background);
|
||||
lichtwerk marked this conversation as resolved
Outdated
|
||||
}
|
||||
|
||||
bool ED_asset_clear_id(ID *id)
|
||||
|
|
Loading…
Reference in New Issue
I'd shorten this to
!G.background
.