After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722197 - use an empty list in case of the Vala block context is null
use an empty list in case of the Vala block context is null
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: language-support-vala
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Abderrahim Kitouni
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-14 16:32 UTC by Yannick Inizan
Modified: 2014-07-23 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use an empty list in case of the Vala block context is null (1.85 KB, patch)
2014-01-14 16:32 UTC, Yannick Inizan
needs-work Details | Review

Description Yannick Inizan 2014-01-14 16:32:55 UTC
Created attachment 266277 [details] [review]
use an empty list in case of the Vala block context is null

it sometimes happens that the current context is null. What makes the "lookup_symbol" function does not work.

please find as attachment, which contains the modification : an empty list in the case of block == null ;)
Comment 1 Abderrahim Kitouni 2014-01-18 19:58:29 UTC
Review of attachment 266277 [details] [review]:

The idea is OK, but I'd rather put the check once inside lookup_symbol rather than duplicate it in two different places.
(btw, the 
    List<Vala.Symbol> matching_symbols = null;
in lookup_symbol could be replaced by
    var matching_symbols = new List<Vala.Symbol> ();
to make the intent more clear)
Comment 2 Abderrahim Kitouni 2014-07-19 14:44:17 UTC
commit cae63fd93ba8424665918dd66d0f38cac249ca23
Author: Abderrahim Kitouni <a.kitouni@gmail.com>
Date:   Tue Jul 8 18:22:46 2014 +0100

    language-support-vala: bgo #722197 - use an empty list in case of the Vala block context is null
Comment 3 Yannick Inizan 2014-07-19 19:26:37 UTC
sorry but the error still occurs on ValaProvider. plugin.get_current_context is sometimes null when it's cast as a Vala.Block
Comment 4 Abderrahim Kitouni 2014-07-23 10:49:51 UTC
Sorry, should be fixed in 2a58a8e5e834a3ded5edc56299a07c43e96b48c1
Comment 5 Yannick Inizan 2014-07-23 12:01:02 UTC
thanks for this update. works fine