[gnome-photos] embed: Assert that we have an active item when previewing
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] embed: Assert that we have an active item when previewing
- Date: Wed, 7 Dec 2016 12:19:34 +0000 (UTC)
commit 60aff16556c1cb10aa77a47cce114637aac521e9
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 6 11:49:08 2016 +0100
embed: Assert that we have an active item when previewing
src/photos-embed.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index 1065523..878d5c7 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -32,6 +32,7 @@
#include <gio/gio.h>
#include <glib/gi18n.h>
+#include "photos-base-item.h"
#include "photos-embed.h"
#include "photos-filterable.h"
#include "photos-item-manager.h"
@@ -249,11 +250,15 @@ static void
photos_embed_prepare_for_preview (PhotosEmbed *self, PhotosWindowMode old_mode)
{
PhotosBaseItem *active_collection;
+ PhotosBaseItem *item;
/* TODO: SearchController,
* ErrorHandler
*/
+ item = PHOTOS_BASE_ITEM (photos_base_manager_get_active_object (self->item_mngr));
+ g_return_if_fail (PHOTOS_IS_BASE_ITEM (item));
+
/* We want to freeze before saving the search state and to thaw
* after restoring it. We could thaw it earlier too, but that would
* lead to a bunch of needless queries from the TrackerControllers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]