Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2008-04-30 02:19:32 +0400
committerEion Robb <eion@robbmob.com>2008-04-30 02:19:32 +0400
commit029f725684a887f9a24f43d7afca2155123864de (patch)
treea31a3e3235891a804948472dffd574a9f6a01831 /skype_messaging_carbon.c
parent281d41adf3d6c223c1d58a06cf6a56174eafac5b (diff)
Fix fatal crash on startup if assistive devices not enabled
Diffstat (limited to 'skype_messaging_carbon.c')
-rw-r--r--skype_messaging_carbon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/skype_messaging_carbon.c b/skype_messaging_carbon.c
index aff151b..a5c4e7e 100644
--- a/skype_messaging_carbon.c
+++ b/skype_messaging_carbon.c
@@ -246,9 +246,15 @@ allow_app_in_skype_api()
AEDesc script_data;
OSAID script_id = kOSANullScript;
OSAError err;
+ FILE *access_file = NULL;
printf("Enabling universal access\n");
- fclose(fopen("/private/var/db/.AccessibilityAPIEnabled", "w"));
+ access_file = fopen("/private/var/db/.AccessibilityAPIEnabled", "w");
+ if (access_file != NULL)
+ {
+ fwrite("a\n", 1, 2, access_file);
+ fclose(access_file);
+ }
ComponentInstance script = OpenDefaultComponent(kOSAComponentType, typeAppleScript);
AECreateDesc(typeChar, script_string, strlen(script_string), &script_data);