From 5fa57dcccf24601c15226c1889a5ea3d97552aa0 Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Mon, 6 Apr 2026 16:24:25 +0300
Subject: tqapplication_x11: fix -Wnonnull warnings

This replaces make-shift abort point which were resulting in SIGSEGV
with tqFatal() calls.

Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tqt/issues/275
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
---
 src/kernel/tqapplication_x11.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index 518f5d2f7..736eb3606 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -2687,9 +2687,7 @@ static GC create_gc( int scrn, bool monochrome )
 GC tqt_xget_readonly_gc( int scrn, bool monochrome )	// get read-only GC
 {
     if ( scrn < 0 || scrn >= appScreenCount ) {
-	tqDebug("invalid screen %d %d", scrn, appScreenCount );
-	TQWidget* bla = 0;
-	bla->setName("hello");
+	tqFatal("invalid screen %d %d", scrn, appScreenCount );
     }
     GC gc;
     if ( monochrome ) {
@@ -2711,9 +2709,7 @@ GC tqt_xget_readonly_gc( int scrn, bool monochrome )	// get read-only GC
 GC tqt_xget_temp_gc( int scrn, bool monochrome )		// get temporary GC
 {
     if ( scrn < 0 || scrn >= appScreenCount ) {
-	tqDebug("invalid screen (tmp) %d %d", scrn, appScreenCount );
-	TQWidget* bla = 0;
-	bla->setName("hello");
+	tqFatal("invalid screen (tmp) %d %d", scrn, appScreenCount );
     }
     GC gc;
     if ( monochrome ) {
-- 
cgit v1.2.3

