[gnome-builder] git: fix line check
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: fix line check
- Date: Tue, 12 Jun 2018 08:48:12 +0000 (UTC)
commit 86a73a8c200ebb5d8675cbe2acafc447ec942886
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 12 01:47:29 2018 -0700
git: fix line check
We want to check for NULL, we don't care about empty length.
src/plugins/git/ide-git-buffer-change-monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/git/ide-git-buffer-change-monitor.c b/src/plugins/git/ide-git-buffer-change-monitor.c
index d81596b95..676720a7b 100644
--- a/src/plugins/git/ide-git-buffer-change-monitor.c
+++ b/src/plugins/git/ide-git-buffer-change-monitor.c
@@ -224,7 +224,7 @@ ide_git_buffer_change_monitor_get_change (IdeBufferChangeMonitor *monitor,
DiffLine key = { line + 1, 0 }; /* Git is 1-based */
DiffLine *ret;
- if (self->lines == NULL || self->lines->len == 0)
+ if (self->lines == NULL || self->lines->data == NULL)
{
/* If within working directory, synthesize line addition. */
if (self->is_child_of_workdir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]