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:
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r--source/creator/creator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 37fbf0cf76a..68753366c7d 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -297,7 +297,6 @@ int main(int argc,
break;
}
}
- MEM_init_memleak_detection();
}
#ifdef BUILD_DATE
@@ -500,6 +499,10 @@ int main(int argc,
callback_main_atexit(&app_init_data);
BKE_blender_atexit_unregister(callback_main_atexit, &app_init_data);
+ /* Initialize memory leak detection after parsing command line arguments
+ * so arguments that call #exit (such as '--version' & '--help') don't report leaks. */
+ MEM_init_memleak_detection();
+
/* Paranoid, avoid accidental re-use. */
#ifndef WITH_PYTHON_MODULE
ba = NULL;