From a5b1d62f9ad1a121cfb9a5bb93e115f77e7b6fe4 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 18 Jun 2012 21:53:41 -0400 Subject: [PATCH] Fix a bug that should never happen This fixes a crash that occurs on systems with no Direct3D device available. The device selector returns a NULL string, which is then strstr'ed for some ancient nvidia card. For now, let's wrap that in a NULL check. Eventually, when we scrub plClient.cpp and winmain.cpp, that hack should just be dropped. --- Sources/Plasma/Apps/plClient/plClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 77c35bcb..6370164f 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -2334,7 +2334,7 @@ void plClient::IDetectAudioVideoSettings() plPipeline::fDefaultPipeParams.VSync = false; // card specific overrides - if(strstr(rec->GetDriverDesc(), "FX 5200")) + if(rec->GetDriverDesc() && strstr(rec->GetDriverDesc(), "FX 5200")) { plPipeline::fDefaultPipeParams.AntiAliasingAmount = 0; }