[gnome-photos] application: Avoid typecasting possibly NULL pointers



commit 5d97f59fffcb4f0e518c806711191899730cc897
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Feb 7 16:00:01 2014 +0100

    application: Avoid typecasting possibly NULL pointers

 src/photos-application.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index f54a9b2..c3fecc9 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -191,11 +191,11 @@ static void
 photos_application_properties (PhotosApplication *self)
 {
   PhotosApplicationPrivate *priv = self->priv;
+  GObject *item;
   GtkWidget *dialog;
-  PhotosBaseItem *item;
   const gchar *id;
 
-  item = PHOTOS_BASE_ITEM (photos_base_manager_get_active_object (priv->item_mngr));
+  item = photos_base_manager_get_active_object (priv->item_mngr);
   if (item == NULL)
     return;
 
@@ -284,11 +284,11 @@ static void
 photos_application_remote_display_current (PhotosApplication *self)
 {
   PhotosApplicationPrivate *priv = self->priv;
-  PhotosBaseItem *item;
+  GObject *item;
   GtkWidget *dialog;
   const gchar *urn;
 
-  item = PHOTOS_BASE_ITEM (photos_base_manager_get_active_object (priv->item_mngr));
+  item = photos_base_manager_get_active_object (priv->item_mngr);
   if (item == NULL)
     return;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]