[brasero] Do not crash when the mime type of an URI can't be identified.
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Do not crash when the mime type of an URI can't be identified.
- Date: Mon, 3 Aug 2009 12:34:04 +0000 (UTC)
commit cdf71fe1f1be747bec01ba84a1ce649addab0b33
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon Aug 3 14:22:51 2009 +0200
Do not crash when the mime type of an URI can't be identified.
src/brasero-project-manager.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/brasero-project-manager.c b/src/brasero-project-manager.c
index 2680b4c..17fabb4 100644
--- a/src/brasero-project-manager.c
+++ b/src/brasero-project-manager.c
@@ -785,6 +785,11 @@ brasero_project_manager_open_by_mime (BraseroProjectManager *manager,
const gchar *uri,
const gchar *mime)
{
+ if (!mime) {
+ /* that can happen when the URI could not be identified */
+ return BRASERO_PROJECT_TYPE_INVALID;
+ }
+
/* When our files/description of x-brasero mime type is not properly
* installed, it's returned as application/xml, so check that too. */
if (!strcmp (mime, "application/x-brasero")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]