fix for crash when running in background mode and adjusting materials
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
#include "BKE_icons.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_global.h" /* only for G.background test */
|
||||
|
||||
#include "BLO_sys_types.h" // for intptr_t support
|
||||
|
||||
@@ -217,7 +218,7 @@ void BKE_icon_changed(int id)
|
||||
{
|
||||
Icon* icon = 0;
|
||||
|
||||
if (!id) return;
|
||||
if (!id || G.background) return;
|
||||
|
||||
icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(id));
|
||||
|
||||
@@ -239,7 +240,7 @@ int BKE_icon_getid(struct ID* id)
|
||||
{
|
||||
Icon* new_icon = 0;
|
||||
|
||||
if (!id)
|
||||
if (!id || G.background)
|
||||
return 0;
|
||||
|
||||
if (id->icon_id)
|
||||
|
||||
Reference in New Issue
Block a user