From e1ea52daafd06a4076d2e087866446058abe024e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 22 Apr 2009 11:55:52 +0200 Subject: [PATCH] Check the cached message structure for null before trying to create a copy --- gstreamer-sharp/Message.custom | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gstreamer-sharp/Message.custom b/gstreamer-sharp/Message.custom index 2877c0a165..dba3f0fb3c 100644 --- a/gstreamer-sharp/Message.custom +++ b/gstreamer-sharp/Message.custom @@ -86,7 +86,8 @@ public Gst.Structure Structure { } ~Message () { - cached_structure.CreateNativeCopy (); + if (cached_structure != null) + cached_structure.CreateNativeCopy (); cached_structure = null; }