summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-09-26 22:19:44 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-09-26 22:19:44 +0100
commit345e2c2047c2b2e388ff6ade61aea4b5e505c151 (patch)
treebc4029ea005f0933f06206ea360cedbccca60c4d /src/corelib/gdi
parent684aa545035b5f13198ce6836a0b324459469558 (diff)
downloadfpGUI-345e2c2047c2b2e388ff6ade61aea4b5e505c151.tar.xz
gdi: oops, fixed code where I check the variable before I actually assign something to it.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index e72dc6bc..311a4fce 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -2194,9 +2194,9 @@ function TfpgGDICanvas.GetPixel(X, Y: integer): TfpgColor;
var
c: longword;
begin
+ c := Windows.GetPixel(FWinGC, X, Y);
if c = CLR_INVALID then
Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color');
- c := Windows.GetPixel(FWinGC, X, Y);
Result := WinColorTofpgColor(c);
end;