diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-02 21:04:37 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-02 21:04:37 +0000 |
commit | a9fc674b3971ec9f20c719f5e8c6b3dfed8c4961 (patch) | |
tree | 5f7f14fff3b488e1367ec836d4b5878ee155ffda /plugins/YAMN/src/account.cpp | |
parent | 3e16157bf6d179040f07a89dac60f2a4a4c1c525 (diff) |
YAMN:
- many small fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15160 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/account.cpp')
-rw-r--r-- | plugins/YAMN/src/account.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index e9d3f715a4..676dfe0b50 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -41,7 +41,6 @@ INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam) { HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; DWORD AccountVersion = (DWORD)lParam; - HACCOUNT NewAccount; //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) if (AccountVersion != YAMN_ACCOUNTVERSION) @@ -49,21 +48,19 @@ INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam) if (Plugin != NULL) { + HACCOUNT NewAccount; if (Plugin->Fcn->NewAccountFcnPtr != NULL) - { //Let plugin create its own structure, which can be derived from CAccount structure NewAccount = Plugin->Fcn->NewAccountFcnPtr(Plugin, YAMN_ACCOUNTVERSION); - NewAccount->Plugin = Plugin; - } else - { //We suggest plugin uses standard CAccount structure, so we create it NewAccount = new struct CAccount; - NewAccount->Plugin = Plugin; - } + //If not created successfully if (NewAccount == NULL) return NULL; + + NewAccount->Plugin = Plugin; //Init every members of structure, used by YAMN InitAccount(NewAccount); |