mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 22:15:33 +02:00
Merge pull request #34 from Splendide-Imaginarius/mkxp-z-eventthread-segfault
Fix segfault when opening settings menu
This commit is contained in:
commit
ad3ddb7f8d
1 changed files with 7 additions and 0 deletions
|
@ -328,6 +328,13 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
|
||||
if (event.key.keysym.scancode == SDL_SCANCODE_F1 && rtData.config.enableSettings)
|
||||
{
|
||||
// Do not open settings menu until initializing shared state.
|
||||
// Opening before initializing shared state will crash (segmentation fault).
|
||||
if (!shState)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef MKXPZ_BUILD_XCODE
|
||||
if (!sMenu)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue