Hi Jeff-

The underscore is a macro to call wxGetTranslation().  There's some null
checking there but more importantly, it returns a wxString that will be
valid regardless of the the contents.  If you cast a wxString with no data
to a C string, you still get the valid pointer to the data segment (just
has length 0).

-S

2018-03-12 10:32 GMT-07:00 Jeff Young <j...@rokeby.ie>:

> I’ve had a couple of crashes while clicking in a window when CvPcb was
> loading footprints.
>
> Both were because a format string of the form  L"blah, blah, %s"  was
> NULL.  Is there some protection that _( "…" ) gives us over using an
> immediate value?  (When I use those instead, it doesn’t crash.)
>
> Thanks,
> Jeff.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to