GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 83930535 authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

sourceview-completion: fix segfault on invalid contexts

parent 827e5ea6
......@@ -50,8 +50,13 @@ public class GVlsui.CompletionProvider : GLib.Object, Gtk.SourceCompletionProvid
if (server == null) {
return;
}
if (context == null) {
return;
}
Gtk.TextIter iter;
context.get_iter (out iter);
if (!context.get_iter (out iter)) {
return;
}
Gtk.TextIter end = Gtk.TextIter ();
Gtk.TextIter istr = Gtk.TextIter ();
end.assign (iter);
......
......@@ -20,7 +20,7 @@ using GVls;
using GVlsui;
class Tests {
static int main (string args[])
static int main (string[] args)
{
GLib.Intl.setlocale (GLib.LocaleCategory.ALL, "");
Test.init (ref args);
......
......@@ -20,7 +20,7 @@ using GVls;
using GVlsui;
class Tests {
static int main (string args[])
static int main (string[] args)
{
GLib.Intl.setlocale (GLib.LocaleCategory.ALL, "");
Test.init (ref args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment