diff options
author | Dan Gudmundsson <[email protected]> | 2018-11-16 09:35:36 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-11-16 11:34:40 +0100 |
commit | 2634c45c63dc6038ab9c738e9ab8ace490802f6d (patch) | |
tree | cde499a946a382087bbc579d25d36067729c5010 /lib/wx/c_src/wxe_impl.cpp | |
parent | db6059a9217767a6e42e93cec05089c0ec977d20 (diff) | |
download | otp-2634c45c63dc6038ab9c738e9ab8ace490802f6d.tar.gz otp-2634c45c63dc6038ab9c738e9ab8ace490802f6d.tar.bz2 otp-2634c45c63dc6038ab9c738e9ab8ace490802f6d.zip |
wx: Do not delay deletes of wxGraphicContext
Fixes crash on Mojave, where refresh events are sent early and
invoked recursively the delete of wxGraphicContext was delayed
until after callback returned causing the crash to happen.
Diffstat (limited to 'lib/wx/c_src/wxe_impl.cpp')
-rw-r--r-- | lib/wx/c_src/wxe_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp index 1510866f09..f856099ffa 100644 --- a/lib/wx/c_src/wxe_impl.cpp +++ b/lib/wx/c_src/wxe_impl.cpp @@ -591,7 +591,7 @@ int WxeApp::newPtr(void * ptr, int type, wxeMemEnv *memenv) { return ref; } -int WxeApp::getRef(void * ptr, wxeMemEnv *memenv) { +int WxeApp::getRef(void * ptr, wxeMemEnv *memenv, int type) { if(!ptr) return 0; // NULL and zero is the same ptrMap::iterator it = ptr2ref.find(ptr); if(it != ptr2ref.end()) { @@ -618,7 +618,7 @@ int WxeApp::getRef(void * ptr, wxeMemEnv *memenv) { } memenv->ref2ptr[ref] = ptr; - ptr2ref[ptr] = new wxeRefData(ref, 0, false, memenv); + ptr2ref[ptr] = new wxeRefData(ref, type, false, memenv); return ref; } |