aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources/backend.c')
-rw-r--r--backendC/CleanCompilerSources/backend.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c
index 74e2b3b..1c979d1 100644
--- a/backendC/CleanCompilerSources/backend.c
+++ b/backendC/CleanCompilerSources/backend.c
@@ -3411,10 +3411,18 @@ BEStrictPositions (int functionIndex, int *bits, int **positions)
strict_positions = ruleType->type_alt_strict_positions;
- Assert (strict_positions != NULL);
-
- *bits = strict_positions->sp_size;
- *positions = strict_positions->sp_bits;
+ if (strict_positions == NULL)
+ {
+ /* this can happen if sa is turned of, or if the sa has failed
+ (for example when it's out of memory) */
+ *bits = 0;
+ *positions = NULL;
+ }
+ else
+ {
+ *bits = strict_positions->sp_size;
+ *positions = strict_positions->sp_bits;
+ }
} /* BEStrictPositions */
int