Fix crash when adding an image with a frame already selected
authorThomas White <taw@bitwiz.me.uk>
Tue, 13 Aug 2019 19:44:23 +0000 (21:44 +0200)
committerThomas White <taw@bitwiz.me.uk>
Tue, 13 Aug 2019 19:44:23 +0000 (21:44 +0200)
libstorycode/gtk/gtkslideview.c

index c0c0d9e..9766572 100644 (file)
@@ -1368,9 +1368,9 @@ static void dnd_receive(GtkWidget *widget, GdkDragContext *drag_context,
                        w = e->drag_corner_x - e->start_corner_x;
                        h = e->drag_corner_y - e->start_corner_y;
 
-                       create_image(e, filename,
-                                    e->start_corner_x, e->start_corner_y,
-                                    w, h);
+                       e->cursor_frame = create_image(e, filename,
+                                                      e->start_corner_x, e->start_corner_y,
+                                                      w, h);
                        free(filename);
                        redraw(e);