sys/ximage/ximagesink.c: Don't use an Atom that doesn't exist.
authorDavid Schleef <ds@schleef.org>
Tue, 20 Jul 2004 19:15:41 +0000 (19:15 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 20 Jul 2004 19:15:41 +0000 (19:15 +0000)
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate):
Don't use an Atom that doesn't exist.

ChangeLog
sys/ximage/ximagesink.c

index e81fda4..5f347ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-20  David Schleef  <ds@schleef.org>
+
+       * sys/ximage/ximagesink.c: (gst_ximagesink_xwindow_decorate):
+       Don't use an Atom that doesn't exist.
+
 2004-07-20  Wim Taymans  <wim@fluendo.com>
 
        * gst/tcp/gstmultifdsink.c: (gst_multifdsink_class_init),
index 5e8f10f..3480bbe 100644 (file)
@@ -314,13 +314,12 @@ gst_ximagesink_xwindow_decorate (GstXImageSink * ximagesink,
   g_mutex_lock (ximagesink->x_lock);
 
   hints_atom = XInternAtom (ximagesink->xcontext->disp, "_MOTIF_WM_HINTS", 1);
-
-  hints = g_malloc0 (sizeof (MotifWmHints));
-
-  if (!hints) {
+  if (hints_atom == None) {
     return FALSE;
   }
 
+  hints = g_malloc0 (sizeof (MotifWmHints));
+
   hints->flags |= MWM_HINTS_DECORATIONS;
   hints->decorations = 1 << 0;