[beast/devel: 59/77] SFI: guard against multiple sfi_init() calls
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 59/77] SFI: guard against multiple sfi_init() calls
- Date: Wed, 1 May 2013 17:32:17 +0000 (UTC)
commit fb266a02313614433b37fad5cf9b331d76bd8feb
Author: Tim Janik <timj gnu org>
Date: Mon Apr 15 03:10:18 2013 +0200
SFI: guard against multiple sfi_init() calls
sfi/sfiwrapper.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/sfi/sfiwrapper.cc b/sfi/sfiwrapper.cc
index 027d2ab..acc8c0f 100644
--- a/sfi/sfiwrapper.cc
+++ b/sfi/sfiwrapper.cc
@@ -48,6 +48,9 @@ bse_flipper_check (const char *key)
void
sfi_init (int *argcp, char **argv, const char *app_name, const Bse::StringVector &args)
{
+ static bool initialized = false;
+ if (initialized)
+ return;
char *prg_name = argcp && *argcp ? g_path_get_basename (argv[0]) : NULL;
if (args.size() == 1 && args[0] == "rapicorn-test-initialization=1")
Rapicorn::init_core_test (app_name ? app_name : prg_name, argcp, argv);
@@ -60,6 +63,7 @@ sfi_init (int *argcp, char **argv, const char *app_name, const Bse::StringVector
_sfi_init_time ();
_sfi_init_glue ();
_sfi_init_file_crawler ();
+ initialized = true;
}
/* --- file testing --- */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]