[gnome-latex: 152/205] Bug correction in cb_save_as()



commit 5d2144d8441d9e180da50791f5b5dad245caed08
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Mon Dec 21 00:59:28 2009 +0100

    Bug correction in cb_save_as()
    
    The path of the document was set always to NULL, it was problematic if
    the user cancels the operation.

 src/callbacks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/callbacks.c b/src/callbacks.c
index 459509c..f39ec6e 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -117,7 +117,7 @@ cb_save_as (void)
        if (latexila.active_doc == NULL)
                return;
 
-       document_t *doc_backup = latexila.active_doc;
+       document_t doc_backup = *latexila.active_doc;
 
        latexila.active_doc->path = NULL;
        latexila.active_doc->saved = FALSE;
@@ -126,7 +126,7 @@ cb_save_as (void)
        // if the user click on cancel
        if (! latexila.active_doc->saved)
        {
-               latexila.active_doc = doc_backup;
+               *latexila.active_doc = doc_backup;
                set_title ();
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]