[SCM] calf/master: Fix multiple assertions when closing main window.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:39:58 UTC 2013
The following commit has been merged in the master branch:
commit cb00f971b5c28b8f6d8ef76bb1d77281f4448580
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Fri Apr 2 23:47:55 2010 +0100
Fix multiple assertions when closing main window.
The set_window function attempted to update the show/hide button status even
when set_window was called with NULL as gui_win, when strip widgets may have
already been destroyed.
diff --git a/src/main_win.cpp b/src/main_win.cpp
index 96bf725..5f7a8ca 100644
--- a/src/main_win.cpp
+++ b/src/main_win.cpp
@@ -157,14 +157,17 @@ void main_window::set_window(plugin_ctl_iface *plugin, plugin_gui_window *gui_wi
if (!strip)
return;
strip->gui_win = gui_win;
- if (!is_closed)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(strip->button), gui_win != NULL);
+ if (gui_win)
+ {
+ if (!is_closed)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(strip->button), gui_win != NULL);
- GtkToggleButton *tb = GTK_TOGGLE_BUTTON(strip->button);
- if (strip->gui_win) {
- gtk_button_set_label(GTK_BUTTON(tb), "Hide");
- } else {
- gtk_button_set_label(GTK_BUTTON(tb), "Show");
+ GtkToggleButton *tb = GTK_TOGGLE_BUTTON(strip->button);
+ if (strip->gui_win) {
+ gtk_button_set_label(GTK_BUTTON(tb), "Hide");
+ } else {
+ gtk_button_set_label(GTK_BUTTON(tb), "Show");
+ }
}
}
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list