Skip to content

Commit

Permalink
caja-application: Check for smclient before trying to load session
Browse files Browse the repository at this point in the history
Fix crash on starting with env DESKTOP_AUTOSTART_ID=ANY_CHARS caja
  • Loading branch information
lukefromdc authored and raveit65 committed Jan 19, 2019
1 parent 3eb0ff8 commit a35b46f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/caja-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,10 +1741,10 @@ caja_application_load_session (CajaApplication *application)
GKeyFile *state_file;
char *data;
caja_application_smclient_initialize (application);
if (!egg_sm_client_is_resumed (application->smclient))
if (!egg_sm_client_is_resumed (application->smclient))
{
return;
}
}

state_file = egg_sm_client_get_state_file (application->smclient);
if (!state_file)
Expand Down Expand Up @@ -2170,7 +2170,7 @@ caja_application_local_command_line (GApplication *application,
/* Initialize and load session info if available */
/* Load session if and only if autostarted */
/* This avoids errors on command line invocation */
if (autostart_id != NULL ) {
if (autostart_id != NULL && self->smclient != NULL ) {
caja_application_load_session (self);
}

Expand Down

0 comments on commit a35b46f

Please sign in to comment.