[gedit] Return a copy of the info if not NULL.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Return a copy of the info if not NULL.
- Date: Sun, 29 Nov 2009 20:27:31 +0000 (UTC)
commit 3da295b5c2531b6f17ce0cdc7e733cd6fc7bcc67
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Nov 29 21:21:31 2009 +0100
Return a copy of the info if not NULL.
gedit/gedit-document.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index e923a40..a221f00 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -2541,7 +2541,10 @@ gedit_document_get_metadata (GeditDocument *doc)
{
g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL);
- return g_file_info_dup (doc->priv->metadata_info);
+ if (doc->priv->metadata_info)
+ return g_file_info_dup (doc->priv->metadata_info);
+ else
+ return NULL;
}
static GFileInfo *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]