https://bugs.kde.org/show_bug.cgi?id=373911
--- Comment #15 from Ralf Habacker <ralf.habac...@freenet.de> --- (In reply to Ralf Habacker from comment #14) > Unfortunally I cannot see yet why calling dynamic_cast(0) could fail: > http://stackoverflow.com/questions/5155820/portably-safe-to-pass-null-zero- > to-dynamic-cast mentions that it should be possible. It turned out that this a windows only gcc issue. For the following method UMLClassifier* UMLObject::asUMLClassifier() { return dynamic_cast<UMLClassifier*>(this); } the following assembler code is created on linux: _ZN9UMLObject15asUMLClassifierEv: testq %rdi, %rdi je .L152 xorl %ecx, %ecx movl $_ZTI13UMLClassifier, %edx movl $_ZTI9UMLObject, %esi jmp __dynamic_cast .L152: xorl %eax, %eax ret The first codes in method checks against null pointer parameter. > testq %rdi, %rdi > je .L152 on windows: __ZN9UMLObject15asUMLClassifierEv: subl $28, %esp movl $0, 12(%esp) movl $__ZTI13UMLClassifier, 8(%esp) movl $__ZTI9UMLObject, 4(%esp) movl %ecx, (%esp) call ___dynamic_cast addl $28, %esp ret -> there is no null pointer check -- You are receiving this mail because: You are watching all bug changes.