Commit 73b54335 authored by Carsten Schlote's avatar Carsten Schlote Committed by Mike Wey
Browse files

Move method call after nullptr check, avoid segfault (#342)

Obviously we should check for a nullptr returned for window
object from builder.getObject(), before we call methods on it.
Signed-off-by: Carsten Schlote's avatarCarsten Schlote <>
parent 77f0cd78
......@@ -34,8 +34,8 @@ int main(string[] args) {
auto window = cast(ApplicationWindow)builder.getObject("window");
if (window !is null) {
window.setTitle("This is a glade application window");
auto button = cast(Button)builder.getObject("button");
if(button !is null) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment