OutpostUniverse / OPHD

OutpostHD - Open source remake of Sierra On-Line's Outpost
BSD 3-Clause "New" or "Revised" License
110 stars 21 forks source link

Changed connnect EventHandler to disconnect. #1433

Closed oscar139 closed 10 months ago

oscar139 commented 10 months ago

I get this exception when running the debugger. After starting a game and returning to the main menu and exiting.

Also after starting a game returning to the main menu and starting a new game.

Exception thrown at 0x00007FF6CE99CD7B in OPHD.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

Investigating the call stack I made my way to this destructor

ResearchReport::~ResearchReport() { NAS2D::Utility<NAS2D::EventHandler>::get().mouseButtonDown().connect({this, &ResearchReport::onMouseDown}); }

I suspect .connect is a typo. Changing it to disconnect gets rid of the exception.