mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:13:24 +00:00
Fix uninitialized pointer crash for "Save As"
The "filename" variable was only initialized when the user accepted the name, so cancelling the file save would randomly use an uninitialized pointer. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
52c3d11d2c
commit
76fc14f1b4
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ static void file_open(GtkWidget *w, gpointer data)
|
|||
static void file_save_as(GtkWidget *w, gpointer data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
char *filename;
|
||||
char *filename = NULL;
|
||||
dialog = gtk_file_chooser_dialog_new("Save File As",
|
||||
GTK_WINDOW(main_window),
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
|
|
Loading…
Add table
Reference in a new issue