diff options
author | FichteFoll <fichtefoll2@googlemail.com> | 2019-11-02 00:52:32 +0100 |
---|---|---|
committer | FichteFoll <fichtefoll2@googlemail.com> | 2019-11-02 01:03:18 +0100 |
commit | 8df7a3b493be526e72ea431f5f38e9f3dcf5671e (patch) | |
tree | 2ca60b6dd804d17db94a2004800cb7a87ce0e1fc | |
parent | Prevent segfault when dragging a single item (diff) | |
download | dragon-8df7a3b493be526e72ea431f5f38e9f3dcf5671e.tar.gz dragon-8df7a3b493be526e72ea431f5f38e9f3dcf5671e.tar.bz2 dragon-8df7a3b493be526e72ea431f5f38e9f3dcf5671e.zip |
Prevent segfault when dragging a single item v2
-rw-r--r-- | dragon.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -53,7 +53,6 @@ struct draggable_thing { // MODE_ALL #define MAX_SIZE 100 char** uri_collection; -char** single_uri_data; int uri_count; bool drag_all = false; // --- @@ -81,12 +80,11 @@ void drag_data_get(GtkWidget *widget, if (info == TARGET_TYPE_URI) { char** uris; + char* single_uri_data[2] = {dd->uri, NULL}; if (drag_all) { uri_collection[uri_count] = NULL; uris = uri_collection; } else { - single_uri_data[0] = dd->uri; - single_uri_data[1] = NULL; uris = single_uri_data; } if (verbose) { @@ -390,7 +388,6 @@ int main (int argc, char **argv) { } } setvbuf(stdout, NULL, _IOLBF, BUFSIZ); - single_uri_data = malloc(sizeof(char*) * 2); GtkAccelGroup *accelgroup; GClosure *closure; |