[Spice-devel] [PATCH] server: Fix the order of the attach_stream() asserts

Francois Gouget fgouget at codeweavers.com
Thu Mar 3 20:22:30 UTC 2016


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

I assume the reason for having two asserts is to help with diagnosis so 
I did not merge them.

 server/stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/stream.c b/server/stream.c
index 2bfb993..f1edec7 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -263,8 +263,8 @@ static void attach_stream(DisplayChannel *display, Drawable *drawable, Stream *s
     DisplayChannelClient *dcc;
     RingItem *item, *next;
 
-    spice_assert(!drawable->stream && !stream->current);
     spice_assert(drawable && stream);
+    spice_assert(!drawable->stream && !stream->current);
     stream->current = drawable;
     drawable->stream = stream;
     stream->last_time = drawable->creation_time;
-- 
2.7.0


More information about the Spice-devel mailing list