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:
Artur Wieczorek
2015-01-03 12:52:05 +01:00
parent 2d8da317c1
commit baf965ef30

View File

@@ -1050,10 +1050,7 @@ public:
const wxArrayInt& values = wxArrayInt() ) const wxArrayInt& values = wxArrayInt() )
{ {
Free(); Free();
if ( &values ) Add(labels,values);
Add(labels,values);
else
Add(labels);
} }
// Creates exclusive copy of current choices // Creates exclusive copy of current choices