[USER32_WINETEST]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 9 Jun 2017 14:08:50 +0000 (14:08 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 9 Jun 2017 14:08:50 +0000 (14:08 +0000)
- Hackfix crash in user32:clipboard test due to NULL pointer returned from GetClipboardData.

svn path=/trunk/; revision=74974

rostests/winetests/user32/clipboard.c

index 923f172..591a47c 100755 (executable)
@@ -2004,11 +2004,17 @@ static void test_handles_process( const char *str )
     trace( "palette %p\n", h );
     h = GetClipboardData( CF_METAFILEPICT );
     ok( is_fixed( h ), "expected fixed mem %p\n", h );
     trace( "palette %p\n", h );
     h = GetClipboardData( CF_METAFILEPICT );
     ok( is_fixed( h ), "expected fixed mem %p\n", h );
+#ifdef __REACTOS__
+    if (h != NULL)
+#endif
     ok( GetObjectType( ((METAFILEPICT *)h)->hMF ) == OBJ_METAFILE,
         "wrong object %p\n", ((METAFILEPICT *)h)->hMF );
     trace( "metafile %p\n", h );
     h = GetClipboardData( CF_DSPMETAFILEPICT );
     ok( is_fixed( h ), "expected fixed mem %p\n", h );
     ok( GetObjectType( ((METAFILEPICT *)h)->hMF ) == OBJ_METAFILE,
         "wrong object %p\n", ((METAFILEPICT *)h)->hMF );
     trace( "metafile %p\n", h );
     h = GetClipboardData( CF_DSPMETAFILEPICT );
     ok( is_fixed( h ), "expected fixed mem %p\n", h );
+#ifdef __REACTOS__
+    if (h != NULL)
+#endif
     ok( GetObjectType( ((METAFILEPICT *)h)->hMF ) == OBJ_METAFILE,
         "wrong object %p\n", ((METAFILEPICT *)h)->hMF );
     trace( "metafile2 %p\n", h );
     ok( GetObjectType( ((METAFILEPICT *)h)->hMF ) == OBJ_METAFILE,
         "wrong object %p\n", ((METAFILEPICT *)h)->hMF );
     trace( "metafile2 %p\n", h );