Skip to content

Commit

Permalink
Fixed progress bar crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed Dec 30, 2015
1 parent 6c2e674 commit 24179f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vendor/cegui-0.4.0-custom/src/elements/CEGUIProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ ProgressBar::~ProgressBar(void)
*************************************************************************/
void ProgressBar::setProgress(float progress)
{
if ( std::isnan( progress ) )
progress = 0;

// legal progress rangeis : 0.0f <= progress <= 1.0f
progress = (progress < 0.0f) ? 0.0f : (progress > 1.0f) ? 1.0f : progress;

Expand Down

0 comments on commit 24179f7

Please sign in to comment.