diff options
author | Dan Gudmundsson <[email protected]> | 2015-04-15 11:42:27 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-05-05 09:30:10 +0200 |
commit | 60229a03667a9bac8917a78c922bec4885d2d53f (patch) | |
tree | fc65bdd34c054bcbe6737a8f1956312ec49a7780 | |
parent | 3e12120327654e7e66f7ae09cd3929cb1132766c (diff) | |
download | otp-60229a03667a9bac8917a78c922bec4885d2d53f.tar.gz otp-60229a03667a9bac8917a78c922bec4885d2d53f.tar.bz2 otp-60229a03667a9bac8917a78c922bec4885d2d53f.zip |
wx: Fix delete object
delete_object used a deleted reference
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 4 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 720526b3b9..8e32aeddc8 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -197,8 +197,8 @@ gen_funcs(Defs) -> w(" if(recurse_level > 1 && refd->type != 4) {~n"), w(" delayed_delete->Append(Ecmd.Save());~n"), w(" } else {~n"), - w(" ((WxeApp *) wxTheApp)->clearPtr(This);~n"), - w(" delete_object(This, refd); }~n"), + w(" delete_object(This, refd);~n"), + w(" ((WxeApp *) wxTheApp)->clearPtr(This);}~n"), w(" } } break;~n"), w(" case WXE_REGISTER_OBJECT: {~n" " registerPid(bp, Ecmd.caller, memenv);~n" diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 91ce5d810c..3b11c0642e 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2014. All Rights Reserved. + * Copyright Ericsson AB 2008-2015. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -51,8 +51,8 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd) if(recurse_level > 1 && refd->type != 4) { delayed_delete->Append(Ecmd.Save()); } else { - ((WxeApp *) wxTheApp)->clearPtr(This); - delete_object(This, refd); } + delete_object(This, refd); + ((WxeApp *) wxTheApp)->clearPtr(This);} } } break; case WXE_REGISTER_OBJECT: { registerPid(bp, Ecmd.caller, memenv); |