summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-04-29 18:43:32 +0200
committerRobin Gareus <robin@gareus.org>2015-04-29 18:43:32 +0200
commit8ed04e215585871de4a6b8b2f99a2f202e7c02f2 (patch)
tree4a002edc0d56a2db7c306b973d23fb1df7c07079 /libs
parentfb3d1a6f244525d02f16cb851b925e07a43b1648 (diff)
remove AU crashlog assert.
in case $HOME/Library/Caches/Ardour4/au_crashlog.txt is not writeable, just log to stderr.
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audio_unit.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 8c1c533467..4b9a81eb9f 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -2375,7 +2375,8 @@ AUPluginInfo::au_start_crashlog ()
assert(!_crashlog_fd);
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("Creating AU Log: %1\n", fn));
if (!(_crashlog_fd = fopen(fn.c_str(), "w"))) {
- PBD::error << "Cannot create AU error-log\n";
+ PBD::error << "Cannot create AU error-log" << fn << "\n";
+ cerr << "Cannot create AU error-log" << fn << "\n";
}
}
@@ -2395,9 +2396,12 @@ AUPluginInfo::au_remove_crashlog ()
void
AUPluginInfo::au_crashlog (std::string msg)
{
- assert(_crashlog_fd);
- fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
- ::fflush(_crashlog_fd);
+ if (!_crashlog_fd) {
+ fprintf(stderr, "AU: %s\n", msg.c_str());
+ } else {
+ fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
+ ::fflush(_crashlog_fd);
+ }
}
void