[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: CSSStyleSheetImpl::doc() can be uninitialized???
From: Martijn Klingens <mklingens () ism ! nl>
Date: 2001-10-24 15:49:33
[Download RAW message or body]
While cleaning up my media code I removed the tossing around of the currently
used media type. Instead, I just retrieve it from the document that is part
of a stylesheet.
However, this gives me an instant crash while khtml tries to load the default
style sheet. I haven't had time to look deep into it, but I have the feeling
that the doc() pointer is null. If that's true, what's the recommended way to
solve this?
The offending function is the following:
-----
void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet )
{
if(!sheet || !sheet->isCSSStyleSheet()) return;
MediaListImpl *media = sheet->media();
bool correctMedium = false;
DOMString curMedium = sheet->doc()->mediaType();
int length = media ? media->length() : 0;
if( length == 0 )
correctMedium = true; // no media implies "all"
// ... etc ...
-----
Relevant backtrace is
-----
(no debugging symbols found)...
#0 0x40eef5a9 in __wait4 () from /lib/libc.so.6
#1 0x40f57ad8 in __DTOR_END__ () from /lib/libc.so.6
#2 0x406dbfe5 in KCrash::defaultCrashHandler ()
from /usr/local/kde/lib/libkdecore.so.3
#3 <signal handler called>
#4 0x408c51f9 in QString::QString () from /usr/lib/qt2//lib/i686/libqt.so.2
#5 0x411a42d9 in DOM::DocumentImpl::mediaType ()
at libkhtml_la_meta_unload.cc:14
#6 0x41231805 in khtml::CSSStyleSelectorList::append ()
at libkhtml_la_meta_unload.cc:14
#7 0x4122f88a in khtml::CSSStyleSelector::loadDefaultStyle ()
at libkhtml_la_meta_unload.cc:14
#8 0x4122f0c8 in khtml::CSSStyleSelector::CSSStyleSelector ()
at libkhtml_la_meta_unload.cc:14
#9 0x411cccc3 in DOM::HTMLDocumentImpl::HTMLDocumentImpl ()
at libkhtml_la_meta_unload.cc:14
-----
Martijn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic