epan: Fix session null-pointer check
authorRoland Knall <rknall@gmail.com>
Tue, 26 Jun 2018 21:55:27 +0000 (14:55 -0700)
committerRoland Knall <rknall@gmail.com>
Tue, 26 Jun 2018 23:19:46 +0000 (23:19 +0000)
Fix rare null-pointer when switching profiles

Change-Id: I2a57ef22b4567f936f3a87e133db6132864a83ac
Reviewed-on: https://code.wireshark.org/review/28468
Reviewed-by: Roland Knall <rknall@gmail.com>
epan/epan.c

index fe1f660c9465e8c3fc2f5aa9a03a4b68e45f9ad6..7efea6c43348e1b22a105233596cc3b7f23c00bd 100644 (file)
@@ -406,7 +406,7 @@ epan_get_frame_ts(const epan_t *session, guint32 frame_num)
 {
        const nstime_t *abs_ts = NULL;
 
-       if (session->funcs.get_frame_ts)
+       if (session && session->funcs.get_frame_ts)
                abs_ts = session->funcs.get_frame_ts(session->prov, frame_num);
 
        if (!abs_ts)