mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-06-25 14:19:49 +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
|
.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)
|
if (g_params.noScreensaver)
|
||||||
g_state.ds->inhibitIdle();
|
g_state.ds->inhibitIdle();
|
||||||
@ -972,7 +977,10 @@ static void lg_shutdown(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
app_releaseAllKeybinds();
|
app_releaseAllKeybinds();
|
||||||
g_state.ds->free();
|
|
||||||
|
if (g_state.dsInitialized)
|
||||||
|
g_state.ds->free();
|
||||||
|
|
||||||
ivshmemClose(&g_state.shm);
|
ivshmemClose(&g_state.shm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ struct AppState
|
|||||||
enum RunState state;
|
enum RunState state;
|
||||||
|
|
||||||
struct LG_DisplayServerOps * ds;
|
struct LG_DisplayServerOps * ds;
|
||||||
|
bool dsInitialized;
|
||||||
|
|
||||||
bool stopVideo;
|
bool stopVideo;
|
||||||
bool ignoreInput;
|
bool ignoreInput;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user