You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working with a C library, and the try/catch mechanism doesn't work well for digging into structs.
For example, I call function that returns a ptr.
let draw: ptr tm_creation_graph_draw_call_data_t = render_component_api.draw_call(...)
if?draw.shader:
# do stuff
If draw is nil then I'll get a crash because the access violation is coming from C and not from Nim. My work around is to use my conditional access macro that does checks at each step.
if?draw.?shader:
# do stuff
The text was updated successfully, but these errors were encountered:
I've been working with a C library, and the try/catch mechanism doesn't work well for digging into structs.
For example, I call function that returns a
ptr
.If
draw
is nil then I'll get a crash because the access violation is coming from C and not from Nim. My work around is to use my conditional access macro that does checks at each step.The text was updated successfully, but these errors were encountered: