Skip to content

Commit

Permalink
Porting: Fix endless loop if image format is not recognized
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Aug 3, 2016
1 parent 2d3f08d commit e0204c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/porting.cpp
Expand Up @@ -619,7 +619,8 @@ bool setXorgWindowIcon(IrrlichtDevice *device,
video::IVideoDriver *v_driver = device->getVideoDriver();

video::IImageLoader *image_loader = NULL;
for (u32 i = v_driver->getImageLoaderCount() - 1; i >= 0; i--) {
u32 cnt = v_driver->getImageLoaderCount();
for (u32 i = 0; i < cnt; i++) {
if (v_driver->getImageLoader(i)->isALoadableFileExtension(icon_file.c_str())) {
image_loader = v_driver->getImageLoader(i);
break;
Expand Down

0 comments on commit e0204c5

Please sign in to comment.