[umbrello] [Bug 456427] code import crash

"Robert Hairgrove" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=456427

Robert Hairgrove <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Robert Hairgrove <[email protected]> ---
I think the problem is that these classes depend on some KDE stuff which define
AST as a macro which formerly was probably std::auto_ptr, but in more recent
versions uses std::unique_ptr.

If the unique_ptr is wrapping a NULL pointer, then of course the &(*) etc. will
crash hbecause this is dereferencing a NULL pointer. However, `operator bool()`
is overloaded in `std::unique_ptr`, so one could also write simply:
```
if (declarator) { // etc.
```
instead of:
```
if (&(*declarator)) {
```
or
```
if (declarator.get())) {
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.