xvimagesink: appname might be NULL
authorStefan Kost <ensonic@users.sf.net>
Thu, 18 Jun 2009 15:13:22 +0000 (18:13 +0300)
committerStefan Kost <ensonic@users.sf.net>
Thu, 18 Jun 2009 15:13:22 +0000 (18:13 +0300)
Don't set title if appname is unknown.

sys/xvimage/xvimagesink.c

index 3e4fe76..c033a33 100644 (file)
@@ -938,8 +938,10 @@ gst_xvimagesink_xwindow_new (GstXvImageSink * xvimagesink,
 
   /* set application name as a title */
   title = g_get_application_name ();
-  if ((XStringListToTextProperty (((char **) &title), 1, &xproperty)) != 0)
-    XSetWMName (xvimagesink->xcontext->disp, xwindow->win, &xproperty);
+  if (title) {
+    if ((XStringListToTextProperty (((char **) &title), 1, &xproperty)) != 0)
+      XSetWMName (xvimagesink->xcontext->disp, xwindow->win, &xproperty);
+  }
 
   if (xvimagesink->handle_events) {
     Atom wm_delete;