]> git.lyx.org Git - features.git/commitdiff
stop segfault in FormPreferences::feedback; real fix will involve thinking about...
authorAllan Rae <rae@lyx.org>
Tue, 7 Nov 2000 06:41:13 +0000 (06:41 +0000)
committerAllan Rae <rae@lyx.org>
Tue, 7 Nov 2000 06:41:13 +0000 (06:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1202 a592a061-630c-0410-9148-cb99ea01b6c8

18 files changed:
ChangeLog
po/POTFILES.in
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/form_citation.C
src/frontends/xforms/form_copyright.C
src/frontends/xforms/form_document.C
src/frontends/xforms/form_error.C
src/frontends/xforms/form_graphics.C
src/frontends/xforms/form_index.C
src/frontends/xforms/form_paragraph.C
src/frontends/xforms/form_preferences.C
src/frontends/xforms/form_print.C
src/frontends/xforms/form_ref.C
src/frontends/xforms/form_tabular.C
src/frontends/xforms/form_tabular_create.C
src/frontends/xforms/form_toc.C
src/frontends/xforms/form_url.C
src/frontends/xforms/forms/fdfixc.sed

index dff67d472d2737db16ef6abac4e26fd6489a21d3..c1f101b65a4a9bbba25cd38c2fa6bb2789cf0553 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-07  Allan Rae  <rae@lyx.org>
+
+       * src/frontends/xforms/FormPreferences.C (feedback): make sure
+       ob isn't 0 before using it.  See comments in function.
+
+       * src/frontends/xforms/forms/fdfixc.sed: tiny spacing fix.
+
+       * src/frontends/xforms/form_*.C: regenerated
+
 2000-11-07  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/LaTeX.C (deplog): change reg1 to handle (/.../.../fil.sty)
index d18943019e80b3f29bea47097260ae46c3037269..cfcf30161702ce831e6a246162c5ebeb468f4f14 100644 (file)
@@ -47,35 +47,35 @@ src/frontends/kde/refdlg.C
 src/frontends/kde/tocdlg.C
 src/frontends/kde/urldlg.C
 src/frontends/xforms/FormBase.h
-src/frontends/xforms/form_citation.C
 src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
 src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_copyright.C
 src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
 src/frontends/xforms/FormError.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_error.C
 src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_graphics.C
 src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
 src/frontends/xforms/FormInset.h
-src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
 src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
 src/frontends/xforms/FormRef.C
-src/frontends/xforms/form_tabular.C
+src/frontends/xforms/form_ref.C
 src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
 src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
 src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
 src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
 src/frontends/xforms/Menubar_pimpl.C
 src/gettext.h
 src/importer.C
index cc6d19333ef63cefcaa19d922d450782c6116f68..134a6c264ca3587642cf2a526a02e0f6997955a6 100644 (file)
@@ -261,6 +261,14 @@ void FormPreferences::apply()
 
 void FormPreferences::feedback( FL_OBJECT * ob )
 {
+       // Angus, do you really want to allow ob to be 0?
+       // You set this in feedbackPost.  Why?
+       if (!ob) return;  // stop a segfault below.
+       // an alternative to the above is to check feedbackObj in
+       // FeedbackCB and not call this function at all.  But that's a 
+       // matter of deciding who should be checking the parameters for this
+       // function.
+
        string str;
 
        if (ob->form->fdui == colours_) {
index fea160b037ee84aecb3f2b5c19a9fbc6f00441be..340c1be1816741a77054f9865c27f37c8ef69c3c 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_citation::~FD_form_citation()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index edefc2543e38e28f68c8d08a65ce8ba636a7809e..23259c6a9d1dca18e3bccd9382f0077294271505 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_copyright::~FD_form_copyright()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 9600aeeee5df6f615d7d8d5f92d18da0dcf96ccf..79123c97d3d26670d1670f141aa6f9b2fe37af85 100644 (file)
@@ -14,7 +14,7 @@
 
 FD_form_tabbed_document::~FD_form_tabbed_document()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -56,7 +56,7 @@ FD_form_tabbed_document * FormDocument::build_tabbed_document()
 
 FD_form_doc_paper::~FD_form_doc_paper()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -177,7 +177,7 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
 
 FD_form_doc_class::~FD_form_doc_class()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -286,7 +286,7 @@ FD_form_doc_class * FormDocument::build_doc_class()
 
 FD_form_doc_language::~FD_form_doc_language()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -336,7 +336,7 @@ FD_form_doc_language * FormDocument::build_doc_language()
 
 FD_form_doc_options::~FD_form_doc_options()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -380,7 +380,7 @@ FD_form_doc_options * FormDocument::build_doc_options()
 
 FD_form_doc_bullet::~FD_form_doc_bullet()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 0262f3a11183ef15896c08323917a83fc1c333d1..efcc8e45aa5d3f04261ab65353beb886c4c51ab9 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_error::~FD_form_error()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index be0354509dd1b64e511b8666826c54bce170c3c0..e27de4f7f4716e160e3811957dfad88ca5a7dae9 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_graphics::~FD_form_graphics()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index fbecb35f83251efd9d52323d9e37b8ffdd762b59..575fed74b827236ac95c01a0fcad168b765d67d4 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_index::~FD_form_index()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 361d3fd3e6f6e8cf148da496ffb9f8c4a4a56c68..3ea62f88825ea44a5d2aff2a3817c9e2493da608 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_paragraph_general::~FD_form_paragraph_general()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -136,7 +136,7 @@ FD_form_paragraph_general * FormParagraph::build_paragraph_general()
 
 FD_form_paragraph_extra::~FD_form_paragraph_extra()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -225,7 +225,7 @@ FD_form_paragraph_extra * FormParagraph::build_paragraph_extra()
 
 FD_form_tabbed_paragraph::~FD_form_tabbed_paragraph()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 3a213a29f50caf7a12de95b35cd2a3cc929929d5..a54d23642c1e4b56ba567b4c353a42cfc34aea42 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_preferences::~FD_form_preferences()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -57,7 +57,7 @@ FD_form_preferences * FormPreferences::build_preferences()
 
 FD_form_outer_tab::~FD_form_outer_tab()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -83,7 +83,7 @@ FD_form_outer_tab * FormPreferences::build_outer_tab()
 
 FD_form_screen_fonts::~FD_form_screen_fonts()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -171,7 +171,7 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts()
 
 FD_form_outputs_misc::~FD_form_outputs_misc()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -223,7 +223,7 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc()
 
 FD_form_spellchecker::~FD_form_spellchecker()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -287,7 +287,7 @@ FD_form_spellchecker * FormPreferences::build_spellchecker()
 
 FD_form_inputs_misc::~FD_form_inputs_misc()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -314,7 +314,7 @@ FD_form_inputs_misc * FormPreferences::build_inputs_misc()
 
 FD_form_language::~FD_form_language()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -386,7 +386,7 @@ FD_form_language * FormPreferences::build_language()
 
 FD_form_colours::~FD_form_colours()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -449,7 +449,7 @@ FD_form_colours * FormPreferences::build_colours()
 
 FD_form_converters::~FD_form_converters()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -497,7 +497,7 @@ FD_form_converters * FormPreferences::build_converters()
 
 FD_form_formats::~FD_form_formats()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -549,7 +549,7 @@ FD_form_formats * FormPreferences::build_formats()
 
 FD_form_lnf_misc::~FD_form_lnf_misc()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -617,7 +617,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc()
 
 FD_form_interface::~FD_form_interface()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -666,7 +666,7 @@ FD_form_interface * FormPreferences::build_interface()
 
 FD_form_printer::~FD_form_printer()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -745,7 +745,7 @@ FD_form_printer * FormPreferences::build_printer()
 
 FD_form_paths::~FD_form_paths()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 4d22c85c22861be558c86a554a5af57baf8a4e25..62f56329b5cfe51fc3068361a06dfe94128135cc 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_print::~FD_form_print()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index ceade206bc1c5b2c5c6092a8e238c931bcfce4da..9b2051e3dc010cd8617fa75dca68988dc091e53c 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_ref::~FD_form_ref()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index bab9f9c9b31639a2812abc2c419b42cace310891..7e2a2eea13653ab4102d55e7d65228f8d273b5e4 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_tabular::~FD_form_tabular()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -51,7 +51,7 @@ FD_form_tabular * FormTabular::build_tabular()
 
 FD_form_tabular_options::~FD_form_tabular_options()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -106,7 +106,7 @@ FD_form_tabular_options * FormTabular::build_tabular_options()
 
 FD_form_column_options::~FD_form_column_options()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -196,7 +196,7 @@ FD_form_column_options * FormTabular::build_column_options()
 
 FD_form_cell_options::~FD_form_cell_options()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
@@ -293,7 +293,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
 
 FD_form_longtable_options::~FD_form_longtable_options()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 02fe6fd134b5a660781d1680441666310cbb9665..06f5f65fb0f1ae18cc74a3fa40327c462080206d 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_tabular_create::~FD_form_tabular_create()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index 92edb0dcbe1c41e29bf3f2dbd10f742945a906cf..1c4928f6fb95a8044beae77b0ca05e2280967d76 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_toc::~FD_form_toc()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index e142d9f4f3199b9f7dfcbf2c5748549b76dc992d..7a2f908cf71d7a0bb3d4c0cf60f8387b6c7a2329 100644 (file)
@@ -12,7 +12,7 @@
 
 FD_form_url::~FD_form_url()
 {
-  if (form->visible ) fl_hide_form( form );
+  if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
index b5ba28f3e4dd74e6a004d60ca29b1943f3235a9c..a625d2625b852fd3c1f9b41b8a66d6c6d12f06e3 100644 (file)
@@ -8,7 +8,7 @@ s/\(.*\) \*create_form_form[^ ]*/\1::~\1()/p
 /\(.*\)::~\(.*\)()/{
 i\
 {\
-  if( form->visible ) fl_hide_form( form );\
+  if ( form->visible ) fl_hide_form( form );\
   fl_free_form( form );\
 }\
 \