Bug 131849

Summary: Crash on edit CSS
Product: quanta Reporter: Yuri <yoghoyogho>
Component: generalAssignee: András Manţia <amantia>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:

Description Yuri 2006-08-04 11:22:41 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian stable Packages

A crash occurs both in Quanta 3.5.2 and Quanta 3.5.3

Here's how to reproduce this crash:
- open a css file, containg a css class. Example:
.myclass {
   background-color: red;
}
- click the CSS icon in the toolbar to open the CSS selector Dialog.
- click the 'classes' tab
- select 'myclass' in the list
- click 'selected' in the fieldset 'remove selector'
note how myclass is removed from the list
- click 'selected' again
note how Quanta crashes...
Comment 1 András Manţia 2006-09-02 00:01:26 UTC
SVN commit 579883 by amantia:

Not setting a pointer to 0 after deletion is asking for trouble.
Fix crash in CSS editor.

BUG: 131849

 M  +1 -0      ChangeLog  
 M  +1 -1      components/csseditor/cssselector.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #579882:579883
@@ -6,6 +6,7 @@
       - symlink handling fixes (hopefully won't break anything)
       - fix Save As problems, possibly #131728
       - add some more special characters to the list [#130513, #124628]
+      - crash fix in CSS editor [#131849]
 
 Version 3.5.4 (Release date: 02-08-2006; Started 24-06-2005):
  - bugfixes:
--- branches/KDE/3.5/kdewebdev/quanta/components/csseditor/cssselector.cpp #579882:579883
@@ -308,7 +308,7 @@
   if( m_currentItem ) {
     m_currentStylesheetStructure.remove(m_currentItem->text(0));
     delete m_currentItem;
-   // m_currentItem = 0L;
+    m_currentItem = 0L;
   }
 }