aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-22 22:57:12 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-22 22:57:12 +0100
commit3587a96e673fad8d64b4f1db1c21755aba6dd1f3 (patch)
tree933f96967d5f8df54ecf055168afad3ac2a071f1
parented8202bd62e00509140d9f036bc813b60852bd16 (diff)
downloadsciteco-3587a96e673fad8d64b4f1db1c21755aba6dd1f3.tar.gz
make sure the NULL filename is handled properly on Windows
-rw-r--r--qbuffers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qbuffers.cpp b/qbuffers.cpp
index 9a12232..de9159e 100644
--- a/qbuffers.cpp
+++ b/qbuffers.cpp
@@ -467,7 +467,7 @@ Ring::edit(const gchar *filename)
current = buffer;
undo_close();
- if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
+ if (filename && g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
buffer->load(filename);
interface.msg(Interface::MSG_INFO,
@@ -687,7 +687,7 @@ get_absolute_path(const gchar *path)
TCHAR buf[MAX_PATH];
gchar *resolved = NULL;
- if (GetFullPathName(path, sizeof(buf), buf, NULL))
+ if (path && GetFullPathName(path, sizeof(buf), buf, NULL))
resolved = g_strdup(buf);
return resolved;