When I launched my executable on Visual Studio, it works. But when I launched it on Windows' file explorer, it stopped working and when I launch debug mode, Visual Studio starts and I have this mistake : Unhandled exception to 0x00007FF6D3C9551B in "Project Name" .exe: 0xC0000005: Access Violation when reading location 0x0000000000000000.
Here is the code :
this->spriteBank = this->_guienv->addEmptySpriteBank(irr::io::path("ressources/cursor"));
cursor = this->_driver->getTexture("ressources/cursor/cursor.png");
if (cursor)
this->cursorSize = cursor->getSize();
this->spriteBank->addTextureAsSprite(cursor);
this->SetMenuModelMainOptions();
this->setMenuModelSubButtons();
this->_device->getCursorControl()->setVisible(false);
irr::core::rect<irr::s32> tabctrlSize = this->tabctrl->getRelativePosition();
irr::s32 tabctrlWidth = tabctrlSize.getWidth();
irr::s32 tabctrlHeight = tabctrlSize.getHeight();
this->midTabctrl = tabctrlSize.getCenter();
this->event.setSelected(this->selected);
this->event.setSavesListBox(this->_guienv->addListBox(irr::core::rect<int>(tabctrlWidth / 10,
tabctrlHeight / 5,
tabctrlWidth - (this->midTabctrl.X / 8 ),
tabctrlHeight - (this->midTabctrl.Y / 3)),
this->tabctrl, 1), this->_saves);
this->saveSubMenuSpriteSize = this->spriteBank->getTexture(irr::u32(MenuModel::SpriteName::SAVE_SUB_MENU))->getSize(); // This line doen't works
Thanks for help
Have a good day