22/05/2013 03:07:41 PM UTC, Florian  Steinhardt: post #27306

If a C API function is called with the SPDConnection pointer still set to NULL the result is a segfault.

C API proposal:

include a check if the connection pointer is set inside each API function:

if (connection)
  old API function

so that the user doesn't have to add this check around each API call himself. Each API function (except spd_open) has the connection pointer already in it's interface. The functins are doing nothing if connection == NULL, maybe they could return an error value, but this is still better than a segfault.

I didn't think of doing these checks at first and got segfaults if the program couldn't connect to speech dispatcher.
Total records: 1
Note: You need to log in before you can post comments.