diff options
author | Dan Gudmundsson <[email protected]> | 2018-12-03 09:36:50 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-12-03 09:36:50 +0100 |
commit | d5632bfb023ac2c0ae25783f7eae3b060164de0b (patch) | |
tree | a3a9e7fa348f23a196b89a3425d83133b61f51f0 /lib/wx/api_gen | |
parent | 2eeab3cc011ec503d7831fe588557f60d69aa8be (diff) | |
parent | 2634c45c63dc6038ab9c738e9ab8ace490802f6d (diff) | |
download | otp-d5632bfb023ac2c0ae25783f7eae3b060164de0b.tar.gz otp-d5632bfb023ac2c0ae25783f7eae3b060164de0b.tar.bz2 otp-d5632bfb023ac2c0ae25783f7eae3b060164de0b.zip |
Merge branch 'dgud/wx/mojave-crash/OTP-15426' into maint
* dgud/wx/mojave-crash/OTP-15426:
wx: Do not delay deletes of wxGraphicContext
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 70a3530526..f13d5873a0 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -995,8 +995,13 @@ build_ret_types(Type,Ps) -> end, lists:foldl(Calc, Free, Ps). -build_ret(Name,_,#type{base={class,Class},single=true}) -> - w(" rt.addRef(getRef((void *)~s,memenv), \"~s\");~n",[Name,Class]); +build_ret(Name,_D,#type{base={class,Class},single=true}=_T) -> + case Class of + "wxGraphicsContext" -> + w(" rt.addRef(getRef((void *)~s,memenv,8), \"~s\");~n",[Name,Class]); + _ -> + w(" rt.addRef(getRef((void *)~s,memenv), \"~s\");~n",[Name,Class]) + end; build_ret(Name,_,#type{name="wxTreeItemId",single=true}) -> w(" rt.add((wxUIntPtr *) ~s.m_pItem);~n",[Name]); build_ret(Name,_,#type{name="wxTreeItemIdValue",single=true}) -> |