[Github-comments] [geany/geany] Push current position to navqueue before navigating back (#1537)
elextr
notifications at xxxxx
Sat Jul 15 01:27:14 UTC 2017
Like @codebrainz I think the original is acceptable, its a cheap test of a return from a function that documents if can return NULL, even if the current context prevents it, and I agree that it is nice to warn the programmer if we think of it.
But like @vfaronov I do not think its a good idea to add crashes that may leak to the user depending on how the distro builds Geany (ie including asserts or not).
So what about leaving the initial `if (doc)` test so it can't crash, but put:
```
if (!doc)g_critical("@vfaranov was right");
```
before the test so it then logs a message, and can be made fatal by setting the `G_DEBUG` environment variable. GTK does this lots.
PS any sensible message will do :-D
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1537#issuecomment-315500275
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170715/c6d0953c/attachment.html>
More information about the Github-comments
mailing list