Merged changes in the trunk up to revision 53280.
[blender.git] / source / blender / blenkernel / intern / library.c
index 2192d2862c8bd002095df6677fe70cd1caec6eb4..98625807ddcd136fe6285f2db38c4ba2463c58f0 100644 (file)
@@ -158,8 +158,10 @@ void id_lib_extern(ID *id)
 /* ensure we have a real user */
 void id_us_ensure_real(ID *id)
 {
-       if (ID_REAL_USERS(id) <= 0) {
-               id->us = MAX2(id->us, 0) + 1;
+       if (id) {
+               if (ID_REAL_USERS(id) <= 0) {
+                       id->us = MAX2(id->us, 0) + 1;
+               }
        }
 }