~vcs-imports/salasaga/salasaga_ide_trunk

« back to all changes in this revision

Viewing changes to functions/slide/slide_delete.c

  • Committer: vapour
  • Date: 2008-09-13 10:50:02 UTC
  • Revision ID: vcs-imports@canonical.com-20080913105002-sy437wmrxhlfys27
Fixing simple memory leaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: slide_delete.c 1749 2008-07-22 14:41:24Z vapour $
3
 
 *
4
 
 * Salasaga: Function called when the user selects Slide -> Delete from the top menu 
5
 
 * 
 
2
 * $Id: slide_delete.c 1846 2008-09-13 10:50:02Z vapour $
 
3
 *
 
4
 * Salasaga: Function called when the user selects Slide -> Delete from the top menu
 
5
 *
6
6
 * Copyright (C) 2005-2008 Justin Clift <justin@salasaga.org>
7
7
 *
8
8
 * This file is part of Salasaga.
9
 
 * 
 
9
 *
10
10
 * Salasaga is free software: you can redistribute it and/or modify
11
11
 * it under the terms of the GNU Lesser General Public License as
12
12
 * published by the Free Software Foundation, either version 3 of
91
91
        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(film_strip_view), new_path, NULL, TRUE, 0.5, 0.0);
92
92
        if (NULL != old_path)
93
93
                gtk_tree_path_free(old_path);  // Free the old path
 
94
        if (NULL != new_path)
 
95
                gtk_tree_path_free(new_path);  // Free the new path
94
96
 
95
97
        // Redraw the timeline
96
98
        draw_timeline();
103
105
 
104
106
        // Update the status bar
105
107
        gtk_statusbar_push(GTK_STATUSBAR(status_bar), statusbar_context, _(" Slide deleted"));
106
 
        gdk_flush();
107
108
 
108
109
        // Free the resources allocated to the deleted slide
109
110
        slide_free(tmp_glist->data, NULL);