mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-10-31 04:31:57 +00:00 
			
		
		
		
	[client] app: don't call ds->free if the ds was not initialized
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Geoffrey McRae
					Geoffrey McRae