anjuta r4731 - in trunk: . plugins/sourceview
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4731 - in trunk: . plugins/sourceview
- Date: Tue, 10 Feb 2009 17:14:48 +0000 (UTC)
Author: jhs
Date: Tue Feb 10 17:14:48 2009
New Revision: 4731
URL: http://svn.gnome.org/viewvc/anjuta?rev=4731&view=rev
Log:
2009-02-10 Johannes Schmid <jhs gnome org>
* plugins/sourceview/sourceview.c
(ilanguage_get_supported_languages):
Don't crash when language manager returns a NULL list of languages (#570492)
Modified:
trunk/ChangeLog
trunk/plugins/sourceview/sourceview.c
Modified: trunk/plugins/sourceview/sourceview.c
==============================================================================
--- trunk/plugins/sourceview/sourceview.c (original)
+++ trunk/plugins/sourceview/sourceview.c Tue Feb 10 17:14:48 2009
@@ -1887,15 +1887,17 @@
static GList* languages = NULL;
if (!languages)
{
- GStrv langs;
- GStrv lang;
- g_object_get (gtk_source_language_manager_get_default(), "language-ids", &langs, NULL);
-
- for (lang = langs; *lang != NULL; lang++)
+ const gchar* const * langs = gtk_source_language_manager_get_language_ids (gtk_source_language_manager_get_default());
+ if (langs)
{
- languages = g_list_append (languages, *lang);
+ const gchar* const * lang;
+
+ for (lang = langs; *lang != NULL; lang++)
+ {
+ languages = g_list_append (languages, (gpointer)*lang);
+ }
}
- }
+ }
return languages;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]