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:
authorCampbell Barton <ideasman42@gmail.com>2010-02-11 19:54:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-11 19:54:25 +0300
commit08d37419805aa1fe7e8041f09e3026a160c8730b (patch)
tree64970e3bc97249ee690f61d3cd3d487b49a90080 /source/blender/blenkernel/intern/icons.c
parent6286e415146f1325207f764b4b9f8c92996cc4a6 (diff)
fix for crash when running in background mode and adjusting materials
Diffstat (limited to 'source/blender/blenkernel/intern/icons.c')
-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)