Skip to content

Commit a35b46f

Browse files
lukefromdcraveit65
authored andcommitted
caja-application: Check for smclient before trying to load session
Fix crash on starting with env DESKTOP_AUTOSTART_ID=ANY_CHARS caja
1 parent 3eb0ff8 commit a35b46f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/caja-application.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,10 +1741,10 @@ caja_application_load_session (CajaApplication *application)
17411741
GKeyFile *state_file;
17421742
char *data;
17431743
caja_application_smclient_initialize (application);
1744-
if (!egg_sm_client_is_resumed (application->smclient))
1744+
if (!egg_sm_client_is_resumed (application->smclient))
17451745
{
17461746
return;
1747-
}
1747+
}
17481748

17491749
state_file = egg_sm_client_get_state_file (application->smclient);
17501750
if (!state_file)
@@ -2170,7 +2170,7 @@ caja_application_local_command_line (GApplication *application,
21702170
/* Initialize and load session info if available */
21712171
/* Load session if and only if autostarted */
21722172
/* This avoids errors on command line invocation */
2173-
if (autostart_id != NULL ) {
2173+
if (autostart_id != NULL && self->smclient != NULL ) {
21742174
caja_application_load_session (self);
21752175
}
21762176

0 commit comments

Comments
 (0)