[gnome-builder/editor-layout] code-assist: short circuit if no local file is saved.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] code-assist: short circuit if no local file is saved.
- Date: Sun, 30 Nov 2014 13:20:38 +0000 (UTC)
commit 417e442437c8c7d7e8dc0dbb13e15e231e6920b0
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 03:12:31 2014 -0800
code-assist: short circuit if no local file is saved.
src/code-assistant/gb-source-code-assistant.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/code-assistant/gb-source-code-assistant.c b/src/code-assistant/gb-source-code-assistant.c
index d51b0aa..10c7eaf 100644
--- a/src/code-assistant/gb-source-code-assistant.c
+++ b/src/code-assistant/gb-source-code-assistant.c
@@ -25,6 +25,7 @@
#include "gb-editor-document.h"
#include "gb-log.h"
#include "gb-source-code-assistant.h"
+#include "gb-string.h"
#include "gca-diagnostics.h"
#include "gca-service.h"
#include "gca-structs.h"
@@ -395,6 +396,9 @@ gb_source_code_assistant_do_parse (gpointer data)
if (gfile)
path = g_file_get_path (gfile);
+ if (gb_str_empty0 (path))
+ RETURN (G_SOURCE_REMOVE);
+
if (!priv->tmpfile_path)
{
int fd;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]