Commit e80187b9 authored by Elliott Sales de Andrade's avatar Elliott Sales de Andrade Committed by Stefan Behnel

Fix crash in lvalue_refs test.

Accessing the first element of a `std::vector` that is empty results in
a crash.
parent 4d041873
...@@ -15,7 +15,7 @@ cdef void foo(vector[dpp] &bar, vector[vector[dp]] &baz) nogil: ...@@ -15,7 +15,7 @@ cdef void foo(vector[dpp] &bar, vector[vector[dp]] &baz) nogil:
def test_lvalue_ref_assignment(): def test_lvalue_ref_assignment():
cdef vector[dpp] bar cdef vector[dpp] bar
cdef vector[vector[dp]] baz cdef vector[vector[dp]] baz
cdef vector[double] data cdef vector[double] data = [0.0]
cdef dp bongle = &data[0] cdef dp bongle = &data[0]
bar.resize(1) bar.resize(1)
......
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