summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-08 14:41:10 +0300
committerinfirit <[email protected]>2014-12-10 10:38:37 +0100
commitb1b2da32f2166adfdf239f3662ee309827f71e53 (patch)
tree13e7326274f253207fd5206d20c5d105ad4dd884 /libcaja-private/caja-file.c
parent7aec152ba9f1f6af1706a5c7608bec317b8fbe79 (diff)
downloadcaja-b1b2da32f2166adfdf239f3662ee309827f71e53.tar.bz2
caja-b1b2da32f2166adfdf239f3662ee309827f71e53.tar.xz
added checks for NULL pointer where it's needed
Diffstat (limited to 'libcaja-private/caja-file.c')
-rw-r--r--libcaja-private/caja-file.c2
1 files changed, 1 insertions, 1 deletions
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);