Skip to content

Commit

Permalink
Merge pull request #141 from X-R-G-B/GUI-fix
Browse files Browse the repository at this point in the history
ZappyGui: fix seg fault
  • Loading branch information
romainpanno authored Jun 22, 2023
2 parents 5040f43 + ea7a08d commit eba748d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/GUI/src/Display/SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,8 @@ namespace GUI {

void SFML::createWindow()
{
bool isIconLoad = true;
try {
_icon.loadFromFile(iconPath);
} catch (const std::exception &e) {
std::cerr << e.what() << std::endl;
isIconLoad = false;
}
_window.create(sf::VideoMode(_width, _height), _windowTitle, _winStyle);
if (isIconLoad) {
if (_icon.loadFromFile(iconPath)) {
_window.setIcon(_icon.getSize().x, _icon.getSize().y, _icon.getPixelsPtr());
}
_window.setFramerateLimit(_framerateLimit);
Expand Down

0 comments on commit eba748d

Please sign in to comment.