<p><b>@ntrel</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/247#discussion_r305807276">src/document.c</a>:</p>
<pre style='color:#555'>> @@ -383,6 +381,10 @@ GeanyDocument *document_get_current(void)
 void document_init_doclist(void)
 {
        documents_array = g_ptr_array_new();
+#ifdef GEANY_DEBUG
+       // add a dummy invalid document to catch naive iteration
+       g_ptr_array_add(documents_array, g_new0(GeanyDocument, 1));
</pre>
<p>Oh I see what you mean. I think it's better not to rely on that working just in case that function is changed later.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/247?email_source=notifications&email_token=AAIOWJ7R7R2YQ6NYIGFQ6OLQAWOSHA5CNFSM4AOXNE42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7EAM3Q#discussion_r305807276">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ7QNQSPBBAZH7RQKKLQAWOSHANCNFSM4AOXNE4Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ472QRG55WORCIWK5LQAWOSHA5CNFSM4AOXNE42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7EAM3Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/247?email_source=notifications\u0026email_token=AAIOWJ7R7R2YQ6NYIGFQ6OLQAWOSHA5CNFSM4AOXNE42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7EAM3Q#discussion_r305807276",
"url": "https://github.com/geany/geany/pull/247?email_source=notifications\u0026email_token=AAIOWJ7R7R2YQ6NYIGFQ6OLQAWOSHA5CNFSM4AOXNE42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7EAM3Q#discussion_r305807276",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>