openbsd-ports/databases/mysqlgui/patches/patch-db_tree_cc

24 lines
1.1 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-db_tree_cc,v 1.2 2001/04/20 09:40:53 wilfried Exp $
--- db_tree.cc.orig Wed Apr 11 21:12:19 2001
+++ db_tree.cc Fri Apr 20 11:24:35 2001
@@ -36,8 +36,8 @@ extern void s_fl_alert (const char *fmt,
class db_tree {
vector<string> databases,tables,strings;
- static void close (Fl_Widget *w,void *p) { w->hide(); delete w;}
- static void close_b (Fl_Return_Button *b,void *p) {Fl_Window *w = (Fl_Window *)p; w->hide(); delete w;}
+ static void close (Fl_Widget *w,void *p) { w->hide(); delete w; w=0;}
+ static void close_b (Fl_Return_Button *b,void *p) {Fl_Window *w = (Fl_Window *)p; w->hide(); delete w; w=0;}
static void put_it(Fl_Widget* w,void* p){
Fl_Toggle_Tree* t=(Fl_Toggle_Tree*) w; if (Fl::event_key()!=65259) return;
if (!t->current()) return; if (sql_command->value()[0]) sql_command->insert(" ");
@@ -111,7 +111,7 @@ public:
return;
}
t->update_height(); w->resizable(t);
- w->show(); while (w->visible()) Fl::wait();
+ w->show(); while (w && w->visible()) Fl::wait();
}
~db_tree (void) {
databases.clear();tables.clear();strings.clear();