[gnome-photos/wip/rishi/misc-fixes: 11/26] base-item: Access the internals only after IS_BASE_ITEM has passed
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 11/26] base-item: Access the internals only after IS_BASE_ITEM has passed
- Date: Tue, 22 Dec 2015 19:35:17 +0000 (UTC)
commit 010ebea806bdbf89aa082de95ab56b0a79de5965
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Dec 18 13:31:42 2015 +0100
base-item: Access the internals only after IS_BASE_ITEM has passed
src/photos-base-item.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 593c7bd..2cab807 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -782,10 +782,11 @@ photos_base_item_load_buffer_async (PhotosBaseItem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- PhotosBaseItemPrivate *priv = self->priv;
+ PhotosBaseItemPrivate *priv;
GTask *task;
g_return_if_fail (PHOTOS_IS_BASE_ITEM (self));
+ priv = self->priv;
if (priv->load_graph == NULL)
{
@@ -1758,10 +1759,11 @@ photos_base_item_load_async (PhotosBaseItem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- PhotosBaseItemPrivate *priv = self->priv;
+ PhotosBaseItemPrivate *priv;
GTask *task;
g_return_if_fail (PHOTOS_IS_BASE_ITEM (self));
+ priv = self->priv;
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, photos_base_item_load_async);
@@ -1905,11 +1907,13 @@ photos_base_item_save_async (PhotosBaseItem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- PhotosBaseItemPrivate *priv = self->priv;
+ PhotosBaseItemPrivate *priv;
GFile *file;
GTask *task;
g_return_if_fail (PHOTOS_IS_BASE_ITEM (self));
+ priv = self->priv;
+
g_return_if_fail (uri != NULL && uri[0] != '\0');
g_return_if_fail (type != NULL && type[0] != '\0');
g_return_if_fail (priv->edit_graph != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]