include svn revision in the crash log, also free smoothview on the off-chance you manage to exit blender while the view is moving :)

This commit is contained in:
Campbell Barton
2013-01-17 09:11:51 +00:00
parent 146d1b9cab
commit 9b57b2315c
2 changed files with 14 additions and 4 deletions

View File

@@ -584,6 +584,9 @@ static void view3d_main_area_free(ARegion *ar)
if (rv3d->depths->depths) MEM_freeN(rv3d->depths->depths);
MEM_freeN(rv3d->depths);
}
if (rv3d->sms) {
MEM_freeN(rv3d->sms);
}
MEM_freeN(rv3d);
ar->regiondata = NULL;
}

View File

@@ -165,9 +165,10 @@ static int print_version(int argc, const char **argv, void *data);
/* for the callbacks: */
#define BLEND_VERSION_STRING_FMT \
"Blender %d.%02d (sub %d)\n", \
BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION \
#define BLEND_VERSION_FMT "Blender %d.%02d (sub %d)"
#define BLEND_VERSION_ARG BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION
/* pass directly to printf */
#define BLEND_VERSION_STRING_FMT BLEND_VERSION_FMT "\n", BLEND_VERSION_ARG
/* Initialize callbacks for the modules that need them */
static void setCallbacks(void);
@@ -538,7 +539,13 @@ static void blender_crash_handler(int signum)
printf("Writing: %s\n", fname);
fflush(stdout);
BLI_snprintf(header, sizeof(header), "# " BLEND_VERSION_STRING_FMT);
BLI_snprintf(header, sizeof(header), "# " BLEND_VERSION_FMT ", Revision: %s\n", BLEND_VERSION_ARG,
#ifdef BUILD_DATE
build_rev
#else
"Unknown"
#endif
);
/* open the crash log */
errno = 0;