Don't test possibly uninitialized variable in wxGCDC::SetLogicalFunction().
The variable "mode" is not filled by TranslateRasterOp() function if the input function is not supported, so don't compare it with wxCOMPOSITION_XOR later. Just compare "function" itself with wxXOR as this works in any case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -505,7 +505,7 @@ void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function )
|
||||
if (m_logicalFunctionSupported)
|
||||
m_logicalFunctionSupported = m_graphicContext->SetCompositionMode(mode);
|
||||
|
||||
if (mode == wxCOMPOSITION_XOR)
|
||||
if ( function == wxXOR )
|
||||
m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE);
|
||||
else
|
||||
m_graphicContext->SetAntialiasMode(wxANTIALIAS_DEFAULT);
|
||||
|
Reference in New Issue
Block a user