Don't reset CFFileDescriptorRef before passing it to
CFFileDescriptorCreateRunLoopSource(), this resulted in a crash inside this
function.
Closes #11542.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66075
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !cffd )
return NULL;
- source->SetFileDescriptor(cffd.release());
-
wxCFRef<CFRunLoopSourceRef>
cfsrc(CFFileDescriptorCreateRunLoopSource(kCFAllocatorDefault, cffd, 0));
if ( !cfsrc )
CFRunLoopRef cfloop = CFGetCurrentRunLoop();
CFRunLoopAddSource(cfloop, cfsrc, kCFRunLoopDefaultMode);
+ source->SetFileDescriptor(cffd.release());
+
return source.release();
}