diff --git a/tests/tst_viewguard.cpp b/tests/tst_viewguard.cpp index 48fba622..452fe863 100644 --- a/tests/tst_viewguard.cpp +++ b/tests/tst_viewguard.cpp @@ -26,4 +26,12 @@ int main() } TEST(g.isNull()); + + // Test when ViewGuard is destroyed before view + // May not crash without ASAN + Views::ViewWrapper_qtwidgets wv(static_cast(nullptr)); + { + ViewGuard gg(&wv); + TEST(!gg.isNull()); + } }