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:
-rw-r--r--source/blender/blenkernel/intern/icons.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index b9e3c593ddf..d6f30506fda 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -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)