Avoid using possibly invalid field in generic wxTimePickerCtrl.
The value actually can't be invalid in this code as we ensure that it's never set to Field_Max elsewhere but as we still have this value in the switch (in order to avoid compile-time warnings about not handling some enum elements), ensure that we don't use this invalid value if we end up here to avoid Coverity warnings about what happens downstream in the code if we did.
This commit is contained in:
@@ -414,6 +414,7 @@ private:
|
||||
|
||||
case Field_Max:
|
||||
wxFAIL_MSG( "Invalid field" );
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateText();
|
||||
|
Reference in New Issue
Block a user