On Tuesday, 4 February 2014 at 10:37:19 UTC, Kapps wrote:
On Tuesday, 4 February 2014 at 06:58:02 UTC, evilrat wrote:
i have some strange behaviour when building with -O, if in
short it reports taking address of interface as dereferencing
null. error reported with 2.065 beta2 and beta3, but i don't
remember if i had this on 2.064. any advices?
here is repro case(for simplicity use dub)
https://gist.github.com/evilrat666/151adaf4ce94ee1a1c68
You are dereferencing null.
You have a side-effect in an assertion, so in non debug code
that code looks like:
IDXGIFactory fact;
while( fact.EnumAdapters(cast(UINT)numAdapters, &temp) !=
DXGI_ERROR_NOT_FOUND ) { ... }
Here fact is guaranteed to be null in non-debug mode as you're
only instantiating it in the assert.
oh, ok thanks. i forgot about asserts being omitted for
release/optimize.
such stupid mistake :(