A quick and dirty fix for a circular allocation issue
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 10 Jun 2018 20:58:19 +0000 (20:58 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 10 Jun 2018 21:21:12 +0000 (21:21 +0000)
query_targets() tried to write to struct that
wasn't yet allocated.
This code is going to change soon, so this is a temporary
fix until then.

gdk/win32/gdkdrop-win32.c

index 2c15be42b66555025873d49ce2e41d7a51f58457..23d95d18248c540b66cb5389ebee02bf247c7f5b 100644 (file)
@@ -435,10 +435,11 @@ idroptarget_dragenter (LPDROPTARGET This,
                                    */
                                   source_context ? source_context->source_surface : NULL,
                                   ctx->dest_surface,
-                                  query_targets (pDataObj, context_win32->droptarget_w32format_contentformat_map),
+                                  query_targets (pDataObj, NULL),
                                   GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE,
                                   GDK_DRAG_PROTO_OLE2);
   context_win32 = GDK_WIN32_DROP_CONTEXT (context);
+  gdk_content_formats_unref (query_targets (pDataObj, context_win32->droptarget_w32format_contentformat_map));
   g_array_set_size (context_win32->droptarget_w32format_contentformat_map, 0);
   g_set_object (&context_win32->local_source_context, GDK_WIN32_DRAG_CONTEXT (source_context));