[baobab] location-list: Nothing do to in add_location if location doesn't have a file
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] location-list: Nothing do to in add_location if location doesn't have a file
- Date: Wed, 3 Oct 2012 17:00:47 +0000 (UTC)
commit 33cedb6bbb2f6c475ad87c590115a7f568196a01
Author: Stefano Facchini <stefano facchini gmail com>
Date: Wed Oct 3 12:15:33 2012 +0200
location-list: Nothing do to in add_location if location doesn't have a file
src/baobab-location-list.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/baobab-location-list.vala b/src/baobab-location-list.vala
index 5a89fe1..dc23018 100644
--- a/src/baobab-location-list.vala
+++ b/src/baobab-location-list.vala
@@ -183,6 +183,10 @@ namespace Baobab {
}
public void add_location (Location location) {
+ if (location.file == null) {
+ return;
+ }
+
if (!already_present (location.file)) {
locations.append (location);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]