Skip to content
Permalink
Browse files

Porting: Fix endless loop if image format is not recognized

  • Loading branch information
est31 committed Aug 3, 2016
1 parent 2d3f08d commit e0204c59883c3ac45252262837f57234c8116f7e
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/porting.cpp
@@ -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;

0 comments on commit e0204c5

Please sign in to comment.