[gtksourceview] Fix crash on win32 with the guess_language func.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceview] Fix crash on win32 with the guess_language func.
- Date: Wed, 18 Nov 2009 17:33:28 +0000 (UTC)
commit 5a4d0012aed72b7a9acffb825b7b019a6f7d601c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Nov 18 18:32:38 2009 +0100
Fix crash on win32 with the guess_language func.
gtksourceview/gtksourcelanguagemanager.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourcelanguagemanager.c b/gtksourceview/gtksourcelanguagemanager.c
index 2d30a45..f4e3ddb 100644
--- a/gtksourceview/gtksourcelanguagemanager.c
+++ b/gtksourceview/gtksourcelanguagemanager.c
@@ -539,7 +539,9 @@ pick_lang_for_mime_type (GtkSourceLanguageManager *lm,
GSList *langs;
langs = pick_langs_for_filename (lm, alt_filename);
- lang = GTK_SOURCE_LANGUAGE (langs->data);
+
+ if (langs != NULL)
+ lang = GTK_SOURCE_LANGUAGE (langs->data);
}
if (lang == NULL && mime_type != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]