X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstd.c;h=87b3f1f137d5950116aeaf1b8b91cd0127715567;hb=e3e1f20c7f5071fb9d1912619a899e542c5d9c71;hp=7cd2313129456605a970924232b0ec990a8e04a7;hpb=1b38775baa3016fb4d613c971dce5a4f26cacb7b;p=libsigrok.git
diff --git a/src/std.c b/src/std.c
index 7cd23131..87b3f1f1 100644
--- a/src/std.c
+++ b/src/std.c
@@ -14,14 +14,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
-/** @file
- * Standard API helper functions.
- * @internal
- */
+/**
+ * @file
+ *
+ * Standard API helper functions.
+ *
+ * @internal
+ */
#include
#include
@@ -91,7 +93,7 @@ SR_PRIV int std_cleanup(const struct sr_dev_driver *di)
*/
SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi)
{
- const char *prefix = sdi->driver->name;
+ const char *prefix = (sdi->driver) ? sdi->driver->name : "unknown";
int ret;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
@@ -123,7 +125,7 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi)
*/
SR_PRIV int std_session_send_df_end(const struct sr_dev_inst *sdi)
{
- const char *prefix = sdi->driver->name;
+ const char *prefix = (sdi->driver) ? sdi->driver->name : "unknown";
int ret;
struct sr_datafeed_packet packet;