13
0

Make ARDOUR::init safer.

git-svn-id: svn://localhost/ardour2/branches/3.0@5950 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-10-27 18:00:45 +00:00
parent da85f65ec0
commit c71f419920
4 changed files with 15 additions and 9 deletions

View File

@ -312,7 +312,9 @@ int main (int argc, char *argv[])
fixup_bundle_environment ();
#endif
if (!Glib::thread_supported())
Glib::thread_init();
gtk_set_locale ();
#ifdef VST_SUPPORT

View File

@ -308,6 +308,11 @@ lotsa_files_please ()
int
ARDOUR::init (bool use_vst, bool try_optimization)
{
if (!Glib::thread_supported())
Glib::thread_init();
PBD::ID::init ();
extern void setup_enum_writer ();
(void) bindtextdomain(PACKAGE, LOCALEDIR);

View File

@ -9,8 +9,6 @@
int
main()
{
Glib::thread_init ();
PBD::ID::init ();
ARDOUR::init (false, false);
CppUnit::TestResult testresult;

View File

@ -38,6 +38,7 @@ uint64_t ID::_counter = 0;
void
ID::init ()
{
if (!counter_lock)
counter_lock = new Glib::Mutex;
}