[System.Windows.Forms] Fix incorrect compare of IntPtr to null
authorMiguel de Icaza <miguel@gnome.org>
Thu, 19 May 2016 03:42:10 +0000 (23:42 -0400)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 19 May 2016 03:42:10 +0000 (23:42 -0400)
mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index 913fb8a57fb721c4148d43e6f575333e943842a6..a8f92d12389c7295755fe15cb5e75d14da12c64b 100644 (file)
@@ -2842,7 +2842,7 @@ namespace System.Windows.Forms {
                                        try {
                                                var clipboardAtom = gdk_atom_intern ("CLIPBOARD", true);
                                                var clipboard = gtk_clipboard_get (clipboardAtom);
-                                               if (clipboard != null) {
+                                               if (clipboard != IntPtr.Zero) {
                                                        // for now we only store text
                                                        var text = Clipboard.GetRtfText ();
                                                        if (string.IsNullOrEmpty (text))