[vala/0.48] vala: Avoid critical in SourceFile.get_mapped_length()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] vala: Avoid critical in SourceFile.get_mapped_length()
- Date: Wed, 10 Aug 2022 17:22:07 +0000 (UTC)
commit cd357c59e4d8f739dbffd14a62a0dbcb46c1d75a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Jun 14 12:43:16 2022 +0200
vala: Avoid critical in SourceFile.get_mapped_length()
See https://gitlab.gnome.org/GNOME/vala/issues/1330
vala/valasourcefile.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index 826925bfd..5f5822629 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -362,6 +362,10 @@ public class Vala.SourceFile {
return content.length;
}
+ if (mapped_file == null) {
+ return 0;
+ }
+
return mapped_file.get_length ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]