Library reload code: add early out in case there is nothing to reload.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 7 Feb 2018 20:52:38 +0000 (21:52 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 7 Feb 2018 20:52:38 +0000 (21:52 +0100)
source/blender/windowmanager/intern/wm_files_link.c

index 05c569cbaacb3fad10f6114cd1dbb2988276347e..dca1077ebc7cb2a45257628d3fa830d8df21d2e1 100644 (file)
@@ -590,6 +590,11 @@ static void lib_relocate_do(
                }
        }
 
+       if (lapp_data->num_items == 0) {
+               /* Early out in case there is nothing to do. */
+               return;
+       }
+
        BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
 
        /* We do not want any instanciation here! */