summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2019-01-16 01:35:01 -0500
committerraveit65 <[email protected]>2019-01-19 12:43:54 +0100
commita35b46f737328262240d816e3c6e6cec55696a3e (patch)
tree5f95d24895c82ab93dd2db47f34e18c15e2fdca5 /src
parent3eb0ff8e1f03d27d7fd5ea6c3f8e699a54d31a4c (diff)
downloadcaja-a35b46f737328262240d816e3c6e6cec55696a3e.tar.bz2
caja-a35b46f737328262240d816e3c6e6cec55696a3e.tar.xz
caja-application: Check for smclient before trying to load session
Fix crash on starting with env DESKTOP_AUTOSTART_ID=ANY_CHARS caja
Diffstat (limited to 'src')
-rw-r--r--src/caja-application.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index 5843c4c5..94a1727b 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -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)
@@ -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);
}