summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-file-operations.c2
-rw-r--r--libcaja-private/caja-file.c2
-rw-r--r--src/caja-connect-server-dialog.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c
index 35ddf81e..e410e41f 100644
--- a/libcaja-private/caja-file-operations.c
+++ b/libcaja-private/caja-file-operations.c
@@ -5273,7 +5273,7 @@ link_file (CopyMoveJob *job,
if (not_local) {
secondary = f (_("Symbolic links only supported for local files"));
details = NULL;
- } else if (IS_IO_ERROR (error, NOT_SUPPORTED)) {
+ } else if (error != NULL && IS_IO_ERROR (error, NOT_SUPPORTED)) {
secondary = f (_("The target doesn't support symbolic links."));
details = NULL;
} else {
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index d80629e2..054f27d5 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -694,7 +694,7 @@ caja_file_get_internal (GFile *location, gboolean create)
/* Ref or create the file. */
if (file != NULL) {
caja_file_ref (file);
- } else if (create) {
+ } else if (create && directory != NULL) {
file = caja_file_new_from_filename (directory, basename, self_owned);
if (self_owned) {
g_assert (directory->details->as_file == NULL);
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 90a8c977..921b2597 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -602,7 +602,7 @@ connect_dialog_connect_to_server (CajaConnectServerDialog *dialog)
uri = g_strdup_printf ("%s://%s%s%s%s%s%s",
meth->scheme,
(user != NULL) ? user : "",
- (user[0] != 0) ? "@" : "",
+ (user != NULL && user[0] != 0) ? "@" : "",
server,
(port_str != NULL) ? ":" : "",
(port_str != NULL) ? port_str : "",