[gnome-photos] main-toolbar: Guard against being in a transitional state
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Guard against being in a transitional state
- Date: Mon, 17 Mar 2014 13:00:02 +0000 (UTC)
commit 83b79b17b64c6499971a6b99f713147faceaf46c
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Mar 17 13:28:15 2014 +0100
main-toolbar: Guard against being in a transitional state
We going back from the preview, we first unset the active item in
PhotosItemManager, and then change the window mode in
PhotosModeController. If we ever reach this code in the middle of this
transition, we should not crash.
Fixes: https://bugzilla.gnome.org/726519
src/photos-main-toolbar.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 2f97217..fa6c1f4 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -132,7 +132,8 @@ photos_main_toolbar_set_toolbar_title (PhotosMainToolbar *self)
GObject *item;
item = photos_base_manager_get_active_object (priv->item_mngr);
- primary = g_markup_printf_escaped ("%s", photos_base_item_get_name (PHOTOS_BASE_ITEM (item)));
+ if (item != NULL)
+ primary = g_markup_printf_escaped ("%s", photos_base_item_get_name (PHOTOS_BASE_ITEM (item)));
}
if (selection_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]