[gnome-photos] base-item: Be more strict about what is acceptable
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Be more strict about what is acceptable
- Date: Sat, 14 Oct 2017 08:27:08 +0000 (UTC)
commit 987c7cef9b5ac0b78b18d2473fa9359b00fd2a56
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Oct 9 19:23:39 2017 +0200
base-item: Be more strict about what is acceptable
A pointer can be non-NULL but still point to invalid memory. Hence,
it's better to assert that it's actually a valid object.
src/photos-base-item.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 3cd628a..84d7703 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -3757,7 +3757,7 @@ photos_base_item_load_async (PhotosBaseItem *self,
g_return_if_fail (!priv->collection);
pipeline = PHOTOS_PIPELINE (egg_task_cache_peek (pipeline_cache, self));
- g_return_if_fail (priv->edit_graph == NULL || pipeline != NULL);
+ g_return_if_fail (priv->edit_graph == NULL || GEGL_IS_NODE (priv->edit_graph) && PHOTOS_IS_PIPELINE
(pipeline));
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, photos_base_item_load_async);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]