[devhelp] DhLink: fix get_book_name() if called on book top-level link
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] DhLink: fix get_book_name() if called on book top-level link
- Date: Thu, 7 Dec 2017 16:04:46 +0000 (UTC)
commit b6d225c14ea91c0c59f3ef1e413756de4b8703db
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Dec 7 16:38:43 2017 +0100
DhLink: fix get_book_name() if called on book top-level link
dh_link_get_book_name() is now implemented similarly than
dh_link_get_book_id().
dh_link_get_book_name() is used only in dh-assistant-view.c and the
change is OK there.
src/dh-link.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-link.c b/src/dh-link.c
index 2e54d0a..3149392 100644
--- a/src/dh-link.c
+++ b/src/dh-link.c
@@ -403,6 +403,9 @@ dh_link_get_book_name (DhLink *link)
{
g_return_val_if_fail (link != NULL, NULL);
+ if (link->type == DH_LINK_TYPE_BOOK)
+ return link->name;
+
if (link->book != NULL)
return link->book->name;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]