mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] app: don't call ds->free if the ds was not initialized
This commit is contained in:
parent
8919d2718f
commit
7d2c9ec447
@ -734,7 +734,12 @@ static int lg_run(void)
|
||||
.minimizeOnFocusLoss = g_params.minimizeOnFocusLoss
|
||||
};
|
||||
|
||||
g_state.ds->init(params);
|
||||
g_state.dsInitialized = g_state.ds->init(params);
|
||||
if (g_state.dsInitialized)
|
||||
{
|
||||
DEBUG_ERROR("Failed to initialize the displayserver backend");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (g_params.noScreensaver)
|
||||
g_state.ds->inhibitIdle();
|
||||
@ -972,7 +977,10 @@ static void lg_shutdown(void)
|
||||
}
|
||||
|
||||
app_releaseAllKeybinds();
|
||||
g_state.ds->free();
|
||||
|
||||
if (g_state.dsInitialized)
|
||||
g_state.ds->free();
|
||||
|
||||
ivshmemClose(&g_state.shm);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ struct AppState
|
||||
enum RunState state;
|
||||
|
||||
struct LG_DisplayServerOps * ds;
|
||||
bool dsInitialized;
|
||||
|
||||
bool stopVideo;
|
||||
bool ignoreInput;
|
||||
|
Loading…
Reference in New Issue
Block a user