Fix wxPGChoices::Set method.
There is no need to check if referenced array with values is valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code". Moreover, conditional call of wxPGChoices::Add() methods (one with explicit parameter and one with default one) is not necessary. This is the backport of r78343. See #16759 (http://trac.wxwidgets.org/ticket/16759).
This commit is contained in:
@@ -1050,10 +1050,7 @@ public:
|
||||
const wxArrayInt& values = wxArrayInt() )
|
||||
{
|
||||
Free();
|
||||
if ( &values )
|
||||
Add(labels,values);
|
||||
else
|
||||
Add(labels);
|
||||
}
|
||||
|
||||
// Creates exclusive copy of current choices
|
||||
|
Reference in New Issue
Block a user